do not instant Special* objects if user is not requesting a special page (save memory...
authorAntoine Musso <hashar@users.mediawiki.org>
Fri, 11 Jun 2004 21:13:51 +0000 (21:13 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Fri, 11 Jun 2004 21:13:51 +0000 (21:13 +0000)
includes/Setup.php
index.php

index 35b5786..d9b3404 100644 (file)
@@ -58,7 +58,6 @@ require_once( 'BlockCache.php' );
 require_once( 'Parser.php' );
 require_once( 'ParserCache.php' );
 require_once( 'WebRequest.php' );
-require_once( 'SpecialPage.php' );
 
 $wgRequest = new WebRequest();
 
@@ -220,10 +219,6 @@ $wgParserCache = new ParserCache();
 $wgParser = new Parser();
 $wgOut->setParserOptions( ParserOptions::newFromUser( $wgUser ) );
 
-if ( !$wgAllowSysopQueries ) {
-       SpecialPage::removePage( 'Asksql' );
-}
-
 # Placeholders in case of DB error
 $wgTitle = Title::newFromText( wfMsg( 'badtitle' ) );
 $wgArticle = new Article($wgTitle);
index f980599..662cc07 100644 (file)
--- a/index.php
+++ b/index.php
@@ -77,6 +77,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) {
        /* redirect to canonical url, make it a 301 to allow caching */
        $wgOut->redirect( $wgTitle->getFullURL(), '301');
 } else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) {
+       # actions that need to be made when we have a special pages
+       require_once( 'includes/SpecialPage.php' );
+       if ( !$wgAllowSysopQueries ) {SpecialPage::removePage( 'Asksql' ); }
        SpecialPage::executePath( $wgTitle );
 } else {
        if ( Namespace::getMedia() == $wgTitle->getNamespace() ) {
@@ -165,4 +168,5 @@ $wgOut->output();
 foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); }
 logProfilingData();
 wfDebug( "Request ended normally\n" );
+print_r($GLOBALS);
 ?>