r114280 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114279‎ | r114280 | r114281 >
Date:16:40, 20 March 2012
Author:jeroendedauw
Status:ok
Tags:
Comment:
kill obsolete code
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/SemanticMediaWiki.hooks.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/SemanticMediaWiki.hooks.php
@@ -176,20 +176,6 @@
177177 }
178178
179179 /**
180 - * @see SMWHooks::addSemanticExtensionType
181 - *
182 - * @since 1.7.1
183 - *
184 - * @param $oSpecialVersion SpecialVersion
185 - * @param $aExtensionTypes Array
186 - *
187 - * @return true
188 - */
189 - public static function oldAddSemanticExtensionType( SpecialVersion &$oSpecialVersion, array &$aExtensionTypes ) {
190 - return self::addSemanticExtensionType( $aExtensionTypes );
191 - }
192 -
193 - /**
194180 * Register tables to be added to temporary tables for parser tests.
195181 * @todo Hard-coding this thwarts the modularity/exchangability of the SMW
196182 * storage backend. The actual list of required tables depends on the backend
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -103,13 +103,7 @@
104104 $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories
105105 $wgHooks['SkinGetPoweredBy'][] = 'SMWHooks::addPoweredBySMW';
106106
107 - if ( version_compare( $wgVersion, '1.17alpha', '>=' ) ) {
108 - // For MediaWiki 1.17 alpha and later.
109 - $wgHooks['ExtensionTypes'][] = 'SMWHooks::addSemanticExtensionType';
110 - } else {
111 - // For pre-MediaWiki 1.17 alpha.
112 - $wgHooks['SpecialVersionExtensionTypes'][] = 'SMWHooks::oldAddSemanticExtensionType';
113 - }
 107+ $wgHooks['ExtensionTypes'][] = 'SMWHooks::addSemanticExtensionType';
114108 }
115109
116110 /**
@@ -417,15 +411,15 @@
418412 */
419413 function smwfSetupExtension() {
420414 wfProfileIn( 'smwfSetupExtension (SMW)' );
421 - global $smwgIP, $smwgScriptPath, $wgFooterIcons, $smwgMasterStore, $smwgIQRunningNumber;
 415+ global $smwgScriptPath, $wgFooterIcons, $smwgMasterStore, $smwgIQRunningNumber;
422416
423417 $smwgMasterStore = null;
424418 $smwgIQRunningNumber = 0;
425419
426 - if ( isset($wgFooterIcons["poweredby"])
427 - && isset($wgFooterIcons["poweredby"]["semanticmediawiki"])
428 - && is_null( $wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] ) ) {
429 - $wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] = "$smwgScriptPath/skins/images/smw_button.png";
 420+ if ( isset( $wgFooterIcons['poweredby'] )
 421+ && isset( $wgFooterIcons['poweredby']['semanticmediawiki'] )
 422+ && is_null( $wgFooterIcons['poweredby']['semanticmediawiki']['src'] ) ) {
 423+ $wgFooterIcons['poweredby']['semanticmediawiki']['src'] = "$smwgScriptPath/skins/images/smw_button.png";
430424 }
431425
432426 wfProfileOut( 'smwfSetupExtension (SMW)' );

Status & tagging log