http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89201

Revision: 89201
Author:   yaron
Date:     2011-05-31 04:22:48 +0000 (Tue, 31 May 2011)
Log Message:
-----------
addToAdminLinks() is now a method in SFUtils, instead of a global function

Modified Paths:
--------------
    trunk/extensions/SemanticForms/SemanticForms.php
    trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php

Modified: trunk/extensions/SemanticForms/SemanticForms.php
===================================================================
--- trunk/extensions/SemanticForms/SemanticForms.php    2011-05-31 04:21:31 UTC 
(rev 89200)
+++ trunk/extensions/SemanticForms/SemanticForms.php    2011-05-31 04:22:48 UTC 
(rev 89201)
@@ -82,7 +82,7 @@
 $wgHooks['SkinTemplateTabs'][] = 'SFFormEditTab::displayTab';
 $wgHooks['SkinTemplateNavigation'][] = 'SFFormEditTab::displayTab2';
 $wgHooks['smwInitProperties'][] = 'SFUtils::initProperties';
-$wgHooks['AdminLinks'][] = 'sffAddToAdminLinks';
+$wgHooks['AdminLinks'][] = 'SFUtils::addToAdminLinks';
 $wgHooks['ParserBeforeStrip'][] = 'SFUtils::cacheFormDefinition';
 $wgHooks['ParserFirstCallInit'][] = 'SFParserFunctions::registerFunctions';
 $wgHooks['MakeGlobalVariablesScript'][] = 'SFFormUtils::setGlobalJSVariables';

Modified: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php      
2011-05-31 04:21:31 UTC (rev 89200)
+++ trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php      
2011-05-31 04:22:48 UTC (rev 89201)
@@ -99,25 +99,3 @@
                $sfgLang = new $sfLangClass();
        }
 }
-
-function sffAddToAdminLinks( &$admin_links_tree ) {
-       $data_structure_label = wfMsg( 'smw_adminlinks_datastructure' );
-       $data_structure_section = $admin_links_tree->getSection( 
$data_structure_label );
-       if ( is_null( $data_structure_section ) )
-               return true;
-       $smw_row = $data_structure_section->getRow( 'smw' );
-       $smw_row->addItem( ALItem::newFromSpecialPage( 'Templates' ), 
'Properties' );
-       $smw_row->addItem( ALItem::newFromSpecialPage( 'Forms' ), 
'SemanticStatistics' );
-       $smw_admin_row = $data_structure_section->getRow( 'smw_admin' );
-       $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateClass' ), 
'SMWAdmin' );
-       $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateProperty' 
), 'SMWAdmin' );
-       $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateTemplate' 
), 'SMWAdmin' );
-       $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateForm' ), 
'SMWAdmin' );
-       $smw_admin_row->addItem( ALItem::newFromSpecialPage( 'CreateCategory' 
), 'SMWAdmin' );
-       $smw_docu_row = $data_structure_section->getRow( 'smw_docu' );
-       $sf_name = wfMsg( 'specialpages-group-sf_group' );
-       $sf_docu_label = wfMsg( 'adminlinks_documentation', $sf_name );
-       $smw_docu_row->addItem( ALItem::newFromExternalLink( 
"http://www.mediawiki.org/wiki/Extension:Semantic_Forms";, $sf_docu_label ) );
-
-       return true;
-}


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to