r60087 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60086‎ | r60087 | r60088 >
Date:19:11, 15 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for magic words, fixed initialization of special properties for non-English-language wikis (this time for real, I think)
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.6.2');
 11+define('SD_VERSION','0.7');
1212
1313 // constants for special properties
1414 define('SD_SP_HAS_FILTER', 1);
@@ -36,9 +36,6 @@
3737 $wgExtensionMessagesFiles['SemanticDrilldown'] = $sdgIP . '/languages/SD_Messages.php';
3838 $wgExtensionAliasesFiles['SemanticDrilldown'] = $sdgIP . '/languages/SD_Aliases.php';
3939
40 -$wgHooks['smwInitProperties'][] = 'sdfInitProperties';
41 -$wgHooks['AdminLinks'][] = 'sdfAddToAdminLinks';
42 -
4340 // register all special pages and other classes
4441 $wgSpecialPages['Filters'] = 'SDFilters';
4542 $wgAutoloadClasses['SDFilters'] = $sdgIP . '/specials/SD_Filters.php';
@@ -55,6 +52,12 @@
5653 $wgAutoloadClasses['SDFilterValue'] = $sdgIP . '/includes/SD_FilterValue.php';
5754 $wgAutoloadClasses['SDAppliedFilter'] = $sdgIP . '/includes/SD_AppliedFilter.php';
5855
 56+$wgHooks['smwInitProperties'][] = 'sdfInitProperties';
 57+$wgHooks['AdminLinks'][] = 'sdfAddToAdminLinks';
 58+$wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs';
 59+$wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage';
 60+$wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
 61+
5962 /**********************************************/
6063 /***** namespace settings *****/
6164 /**********************************************/
@@ -186,7 +189,7 @@
187190 $sd_prop_aliases = $sdgContLang->getPropertyAliases();
188191 foreach ($sd_prop_aliases as $prop_alias => $prop_id) {
189192 $prop_vals = $sd_property_vals[$prop_id];
190 - SMWPropertyValue::registerProperty($prop_vals[0], $prop_vals[1], $prop_alias, true);
 193+ SMWPropertyValue::registerPropertyAlias($prop_vals[0], $prop_alias);
191194 }
192195 }
193196 return true;

Status & tagging log