Introducing special page modular extensions, making the board vote special page the...
[lhc/web/wiklou.git] / includes / Setup.php
index dabad2b..7a66808 100644 (file)
@@ -58,6 +58,8 @@ require_once( "BlockCache.php" );
 require_once( "Parser.php" );
 require_once( "ParserCache.php" );
 require_once( "WebRequest.php" );
+require_once( "SpecialPage.php" );
+
 $wgRequest = new WebRequest();
 
 
@@ -187,6 +189,18 @@ $wgParserCache = new ParserCache();
 $wgParser = new Parser();
 $wgOut->setParserOptions( ParserOptions::newFromUser( $wgUser ) );
 
+if ( !$wgAllowSysopQueries ) {
+       SpecialPage::removePage( "Asksql" );
+}
+
+# Extension setup functions
+# Entries should be added to this variable during the inclusion 
+# of the extension file. This allows the extension to perform 
+# any necessary initialisation in the fully initialised environment
+foreach ( $wgExtensionFunctions as $func ) {
+       $func();
+}
+
 wfProfileOut( "$fname-misc" );
 wfProfileOut( $fname );