r44905 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44904‎ | r44905 | r44906 >
Date:17:48, 22 December 2008
Author:yaron
Status:deferred
Tags:
Comment:
New method names for language
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php
@@ -7,7 +7,7 @@
88
99 if (!defined('MEDIAWIKI')) die();
1010
11 -define('SD_VERSION','0.5.1');
 11+define('SD_VERSION','0.5.2');
1212
1313 // constants for special properties
1414 define('SD_SP_HAS_FILTER', 1);
@@ -166,7 +166,7 @@
167167
168168 function sdfInitProperties() {
169169 global $sdgContLang;
170 - $sd_props = $sdgContLang->getSpecialPropertiesArray();
 170+ $sd_props = $sdgContLang->getPropertyLabels();
171171 SMWPropertyValue::registerProperty('_SD_F', '_wpg', $sd_props[SD_SP_HAS_FILTER], true);
172172 SMWPropertyValue::registerProperty('_SD_CP', '_wpp', $sd_props[SD_SP_COVERS_PROPERTY], true);
173173 SMWPropertyValue::registerProperty('_SD_V', '_str', $sd_props[SD_SP_HAS_VALUE], true);
@@ -246,8 +246,8 @@
247247 }
248248 // remove the special properties of Semantic Drilldown from this list...
249249 global $sdgContLang;
250 - $sd_props = $sdgContLang->getSpecialPropertiesArray();
251 - $sd_prop_aliases = $sdgContLang->getSpecialPropertyAliases();
 250+ $sd_props = $sdgContLang->getPropertyLabels();
 251+ $sd_prop_aliases = $sdgContLang->getPropertyAliases();
252252 foreach (array_keys($all_properties) as $prop_name) {
253253 foreach ($sd_props as $prop => $label) {
254254 if ($prop_name == $label) {
@@ -308,7 +308,7 @@
309309 // otherwise, it's a bit more complicated
310310 global $sdgContLang;
311311
312 - $sd_props = $sdgContLang->getSpecialPropertiesArray();
 312+ $sd_props = $sdgContLang->getPropertyLabels();
313313 $values = array();
314314 if (array_key_exists($prop, $sd_props)) {
315315 $property = $sd_props[$prop];
@@ -324,7 +324,7 @@
325325 }
326326 }
327327 // try aliases as well
328 - foreach ($sdgContLang->getSpecialPropertyAliases() as $alias => $cur_prop) {
 328+ foreach ($sdgContLang->getPropertyAliases() as $alias => $cur_prop) {
329329 // make sure alias doesn't match actual property name - this
330330 // is an issue for English, since the English-language values
331331 // are used for aliases
@@ -346,9 +346,6 @@
347347 * Gets all the filters specified for a category.
348348 */
349349 function sdfLoadFiltersForCategory($category) {
350 - global $sdgContLang;
351 - $sd_props = $sdgContLang->getSpecialPropertiesArray();
352 -
353350 $filters = array();
354351 $filter_names = sdfGetValuesForProperty(str_replace(' ', '_', $category), NS_CATEGORY, '_SD_F', SD_SP_HAS_FILTER, SD_NS_FILTER);
355352 foreach ($filter_names as $filter_name) {

Status & tagging log