Index: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | * @param $useAlias boolean determining whether to check if the label is an alias |
257 | 257 | * @return mixed string property ID or false |
258 | 258 | */ |
259 | | - static protected function findPropertyID( $label, $useAlias = true ) { |
| 259 | + protected static function findPropertyID( $label, $useAlias = true ) { |
260 | 260 | SMWDIProperty::initPropertyRegistration(); |
261 | 261 | $id = array_search( $label, SMWDIProperty::$m_prop_labels ); |
262 | 262 | if ( $id !== false ) { |
— | — | @@ -308,8 +308,9 @@ |
309 | 309 | } |
310 | 310 | |
311 | 311 | global $smwgContLang, $smwgUseCategoryHierarchy; |
312 | | - SMWDIProperty::$m_prop_labels = $smwgContLang->getPropertyLabels(); |
313 | | - SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases(); |
| 312 | + $datatypeLabels = $smwgContLang->getDatatypeLabels(); |
| 313 | + SMWDIProperty::$m_prop_labels = $smwgContLang->getPropertyLabels() + $datatypeLabels; |
| 314 | + SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases() + $smwgContLang->getDatatypeAliases(); |
314 | 315 | // Setup built-in predefined properties. |
315 | 316 | // NOTE: all ids must start with underscores. The translation |
316 | 317 | // for each ID, if any, is defined in the language files. |
— | — | @@ -335,6 +336,11 @@ |
336 | 337 | '_SF_DF' => array( '__spf', true ), // Semantic Form's default form property |
337 | 338 | '_SF_AF' => array( '__spf', true ), // Semantic Form's alternate form property |
338 | 339 | ); |
| 340 | + |
| 341 | + foreach ( $datatypeLabels as $typeid => $label ) { |
| 342 | + SMWDIProperty::$m_prop_types[$typeid] = array( $typeid, true ); |
| 343 | + } |
| 344 | + |
339 | 345 | wfRunHooks( 'smwInitProperties' ); |
340 | 346 | } |
341 | 347 | |