r89194 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89193‎ | r89194 | r89195 >
Date:23:41, 30 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Changed addToAdminLinks() from a global function to a method of SDUtils
Modified paths:
  • /trunk/extensions/SemanticDrilldown/SemanticDrilldown.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/includes/SD_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php
@@ -372,4 +372,18 @@
373373 return true;
374374 }
375375
 376+ public static function addToAdminLinks( &$admin_links_tree ) {
 377+ $browse_search_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_browsesearch' ) );
 378+ $sd_row = new ALRow( 'sd' );
 379+ $sd_row->addItem( ALItem::newFromSpecialPage( 'BrowseData' ) );
 380+ $sd_row->addItem( ALItem::newFromSpecialPage( 'Filters' ) );
 381+ $sd_row->addItem( ALItem::newFromSpecialPage( 'CreateFilter' ) );
 382+ $sd_name = wfMsg( 'specialpages-group-sd_group' );
 383+ $sd_docu_label = wfMsg( 'adminlinks_documentation', $sd_name );
 384+ $sd_row->addItem( AlItem::newFromExternalLink( "http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown", $sd_docu_label ) );
 385+
 386+ $browse_search_section->addRow( $sd_row );
 387+
 388+ return true;
 389+ }
376390 }
Index: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php
@@ -60,7 +60,7 @@
6161 $wgAutoloadClasses['SDAppliedFilter'] = $sdgIP . '/includes/SD_AppliedFilter.php';
6262
6363 $wgHooks['smwInitProperties'][] = 'sdfInitProperties';
64 -$wgHooks['AdminLinks'][] = 'sdfAddToAdminLinks';
 64+$wgHooks['AdminLinks'][] = 'SDUtils::addToAdminLinks';
6565 $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs';
6666 $wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage';
6767 $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
@@ -236,18 +236,3 @@
237237 }
238238 return true;
239239 }
240 -
241 -function sdfAddToAdminLinks( &$admin_links_tree ) {
242 - $browse_search_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_browsesearch' ) );
243 - $sd_row = new ALRow( 'sd' );
244 - $sd_row->addItem( ALItem::newFromSpecialPage( 'BrowseData' ) );
245 - $sd_row->addItem( ALItem::newFromSpecialPage( 'Filters' ) );
246 - $sd_row->addItem( ALItem::newFromSpecialPage( 'CreateFilter' ) );
247 - $sd_name = wfMsg( 'specialpages-group-sd_group' );
248 - $sd_docu_label = wfMsg( 'adminlinks_documentation', $sd_name );
249 - $sd_row->addItem( AlItem::newFromExternalLink( "http://www.mediawiki.org/wiki/Extension:Semantic_Drilldown", $sd_docu_label ) );
250 -
251 - $browse_search_section->addRow( $sd_row );
252 -
253 - return true;
254 -}

Status & tagging log