diff options
author | Happy-melon <happy-melon@users.mediawiki.org> | 2011-04-03 19:39:39 +0000 |
---|---|---|
committer | Happy-melon <happy-melon@users.mediawiki.org> | 2011-04-03 19:39:39 +0000 |
commit | d6defb96794deb944c4dde422582f8c08c8d1a9c (patch) | |
tree | 9be9febb61074f4cadf1d88afc842e00fae32965 /index.php | |
parent | 08e7495043ec45f3d52f0f110f554cf37fd57d19 (diff) | |
download | mediawikicore-d6defb96794deb944c4dde422582f8c08c8d1a9c.tar.gz mediawikicore-d6defb96794deb944c4dde422582f8c08c8d1a9c.zip |
Store the WebRequest and OutputPage in the MediaWiki class, don't pass the global variables in to each function separately.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/85271
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/index.php b/index.php index 89a6bd0ec2f9..7184ebf34a31 100644 --- a/index.php +++ b/index.php @@ -44,7 +44,7 @@ wfProfileIn( 'index.php' ); wfProfileIn( 'index.php-setup' ); # Initialize MediaWiki base class -$mediaWiki = new MediaWiki(); +$mediaWiki = new MediaWiki( $wgRequest, $wgOut ); $maxLag = $wgRequest->getVal( 'maxlag' ); if ( !is_null( $maxLag ) ) { @@ -56,7 +56,7 @@ if ( !is_null( $maxLag ) ) { } # Set title from request parameters -$wgTitle = $mediaWiki->checkInitialQueries( $wgRequest ); +$wgTitle = $mediaWiki->checkInitialQueries(); $action = $wgRequest->getVal( 'action', 'view' ); wfProfileOut( 'index.php-setup' ); @@ -88,7 +88,7 @@ if ( $wgUseFileCache && $wgTitle !== null ) { # Tell $wgOut that output is taken care of $wgOut->disable(); wfProfileOut( 'index.php-filecache' ); - $mediaWiki->finalCleanup( $wgOut ); + $mediaWiki->finalCleanup(); wfProfileOut( 'index.php' ); $mediaWiki->restInPeace(); exit; @@ -106,8 +106,8 @@ $mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage ); $mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor ); $mediaWiki->setVal( 'UsePathInfo', $wgUsePathInfo ); -$mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest ); -$mediaWiki->finalCleanup( $wgOut ); +$mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgUser ); +$mediaWiki->finalCleanup(); wfProfileOut( 'index.php' ); |