r89201 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89200‎ | r89201 | r89202 >
Date:04:22, 31 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
addToAdminLinks() is now a method in SFUtils, instead of a global function
Modified paths:
  • /trunk/extensions/SemanticForms/SemanticForms.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/SemanticForms.php
@@ -82,7 +82,7 @@
8383 $wgHooks['SkinTemplateTabs'][] = 'SFFormEditTab::displayTab';
8484 $wgHooks['SkinTemplateNavigation'][] = 'SFFormEditTab::displayTab2';
8585 $wgHooks['smwInitProperties'][] = 'SFUtils::initProperties';
86 -$wgHooks['AdminLinks'][] = 'sffAddToAdminLinks';
 86+$wgHooks['AdminLinks'][] = 'SFUtils::addToAdminLinks';
8787 $wgHooks['ParserBeforeStrip'][] = 'SFUtils::cacheFormDefinition';
8888 $wgHooks['ParserFirstCallInit'][] = 'SFParserFunctions::registerFunctions';
8989 $wgHooks['MakeGlobalVariablesScript'][] = 'SFFormUtils::setGlobalJSVariables';
Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
@@ -99,25 +99,3 @@
100100 $sfgLang = new $sfLangClass();
101101 }
102102 }
103 -
104 -function sffAddToAdminLinks( &$admin_links_tree ) {
105 - $data_structure_label = wfMsg( 'smw_adminlinks_datastructure' );
106 - $data_structure_section = $admin_links_tree->getSection( $data_structure_label );
107 - if ( is_null( $data_structure_section ) )
108 - return true;
109 - $smw_row = $data_structure_section->getRow( 'smw' );
110 - $smw_row->addItem( ALItem::newFromSpecialPage( 'Templates' ), 'Properties' );
111 - $smw_row->addItem( ALItem::newFromSpecialPage( 'Forms' ), 'SemanticStatistics' );
112 - $smw_admin_row = $data_structure_section->getRow( 'smw_admin' );
113 - $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateClass' ), 'SMWAdmin' );
114 - $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateProperty' ), 'SMWAdmin' );
115 - $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateTemplate' ), 'SMWAdmin' );
116 - $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateForm' ), 'SMWAdmin' );
117 - $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateCategory' ), 'SMWAdmin' );
118 - $smw_docu_row = $data_structure_section->getRow( 'smw_docu' );
119 - $sf_name = wfMsg( 'specialpages-group-sf_group' );
120 - $sf_docu_label = wfMsg( 'adminlinks_documentation', $sf_name );
121 - $smw_docu_row->addItem( ALItem::newFromExternalLink( "http://www.mediawiki.org/wiki/Extension:Semantic_Forms", $sf_docu_label ) );
122 -
123 - return true;
124 -}