Index: trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | if (!defined('MEDIAWIKI')) die(); |
10 | 10 | |
11 | | -define('SD_VERSION','0.5.1'); |
| 11 | +define('SD_VERSION','0.5.2'); |
12 | 12 | |
13 | 13 | // constants for special properties |
14 | 14 | define('SD_SP_HAS_FILTER', 1); |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | |
168 | 168 | function sdfInitProperties() { |
169 | 169 | global $sdgContLang; |
170 | | - $sd_props = $sdgContLang->getSpecialPropertiesArray(); |
| 170 | + $sd_props = $sdgContLang->getPropertyLabels(); |
171 | 171 | SMWPropertyValue::registerProperty('_SD_F', '_wpg', $sd_props[SD_SP_HAS_FILTER], true); |
172 | 172 | SMWPropertyValue::registerProperty('_SD_CP', '_wpp', $sd_props[SD_SP_COVERS_PROPERTY], true); |
173 | 173 | SMWPropertyValue::registerProperty('_SD_V', '_str', $sd_props[SD_SP_HAS_VALUE], true); |
— | — | @@ -246,8 +246,8 @@ |
247 | 247 | } |
248 | 248 | // remove the special properties of Semantic Drilldown from this list... |
249 | 249 | global $sdgContLang; |
250 | | - $sd_props = $sdgContLang->getSpecialPropertiesArray(); |
251 | | - $sd_prop_aliases = $sdgContLang->getSpecialPropertyAliases(); |
| 250 | + $sd_props = $sdgContLang->getPropertyLabels(); |
| 251 | + $sd_prop_aliases = $sdgContLang->getPropertyAliases(); |
252 | 252 | foreach (array_keys($all_properties) as $prop_name) { |
253 | 253 | foreach ($sd_props as $prop => $label) { |
254 | 254 | if ($prop_name == $label) { |
— | — | @@ -308,7 +308,7 @@ |
309 | 309 | // otherwise, it's a bit more complicated |
310 | 310 | global $sdgContLang; |
311 | 311 | |
312 | | - $sd_props = $sdgContLang->getSpecialPropertiesArray(); |
| 312 | + $sd_props = $sdgContLang->getPropertyLabels(); |
313 | 313 | $values = array(); |
314 | 314 | if (array_key_exists($prop, $sd_props)) { |
315 | 315 | $property = $sd_props[$prop]; |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | } |
326 | 326 | } |
327 | 327 | // try aliases as well |
328 | | - foreach ($sdgContLang->getSpecialPropertyAliases() as $alias => $cur_prop) { |
| 328 | + foreach ($sdgContLang->getPropertyAliases() as $alias => $cur_prop) { |
329 | 329 | // make sure alias doesn't match actual property name - this |
330 | 330 | // is an issue for English, since the English-language values |
331 | 331 | // are used for aliases |
— | — | @@ -346,9 +346,6 @@ |
347 | 347 | * Gets all the filters specified for a category. |
348 | 348 | */ |
349 | 349 | function sdfLoadFiltersForCategory($category) { |
350 | | - global $sdgContLang; |
351 | | - $sd_props = $sdgContLang->getSpecialPropertiesArray(); |
352 | | - |
353 | 350 | $filters = array(); |
354 | 351 | $filter_names = sdfGetValuesForProperty(str_replace(' ', '_', $category), NS_CATEGORY, '_SD_F', SD_SP_HAS_FILTER, SD_NS_FILTER); |
355 | 352 | foreach ($filter_names as $filter_name) { |