Index: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php |
— | — | @@ -202,8 +202,11 @@ |
203 | 203 | $typearray = smwfGetStore()->getPropertyValues( $diWikiPage, new SMWDIProperty( '_TYPE' ) ); |
204 | 204 | if ( count( $typearray ) >= 1 ) { // some types given, pick one (hopefully unique) |
205 | 205 | $typeString = reset( $typearray ); |
206 | | - $this->m_proptypeid = ( $typeString instanceOf SMWDIWikiPage ) ? |
207 | | - SMWDataValueFactory::findTypeID( $typeString->getDBKey() ) : '__err'; |
| 206 | + if ( $typeString instanceOf SMWDIWikiPage ) { |
| 207 | + $this->m_proptypeid = SMWDataValueFactory::findTypeID( str_replace( '_', ' ', $typeString->getDBKey() ) ); |
| 208 | + } else { |
| 209 | + $this->m_proptypeid = '__err'; |
| 210 | + } |
208 | 211 | } elseif ( count( $typearray ) == 0 ) { // no type given |
209 | 212 | $this->m_proptypeid = $smwgPDefaultType; |
210 | 213 | } |