Added since notice to indicate method was not present in MW 1.16 yet
[lhc/web/wiklou.git] / index.php
index 7469866..1d229b0 100644 (file)
--- a/index.php
+++ b/index.php
  *
  * ----------
  *
- * Copyright (C) 2001-2010 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
+ * Copyright (C) 2001-2011 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
  * Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason,
  * Niklas Laxström, Domas Mituzas, Rob Church, Yuri Astrakhan, Aryeh Gregor,
- * Aaron Schulz and others.
+ * Aaron Schulz, Andrew Garrett, Raimond Spekking, Alexandre Emsenhuber
+ * Siebrand Mazeland, Chad Horohoe, Roan Kattouw and others.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -50,15 +51,13 @@ if( !is_null( $maxLag ) && !$mediaWiki->checkMaxLag( $maxLag ) ) {
        exit;
 }
 
-# Query string fields
-$action = $wgRequest->getVal( 'action', 'view' );
-$title = $wgRequest->getVal( 'title' );
-
 # Set title from request parameters
-$wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
+$wgTitle = $mediaWiki->checkInitialQueries( $wgRequest );
 
 wfProfileOut( 'main-misc-setup' );
 
+$action = $wgRequest->getVal( 'action' );
+
 # Send Ajax requests to the Ajax dispatcher.
 if( $wgUseAjax && $action == 'ajax' ) {
        $dispatcher = new AjaxDispatcher();
@@ -82,7 +81,10 @@ if( $wgUseFileCache && $wgTitle !== null ) {
                        # Do any stats increment/watchlist stuff
                        $wgArticle = MediaWiki::articleFromTitle( $wgTitle );
                        $wgArticle->viewUpdates();
+                       # Tell $wgOut that output is taken care of
+                       $wgOut->disable();
                        wfProfileOut( 'main-try-filecache' );
+                       $mediaWiki->finalCleanup( $wgOut );
                        $mediaWiki->restInPeace();
                        exit;
                }
@@ -91,12 +93,9 @@ if( $wgUseFileCache && $wgTitle !== null ) {
 }
 
 # Setting global variables in mediaWiki
-$mediaWiki->setVal( 'action', $action );
-$mediaWiki->setVal( 'DisabledActions', $wgDisabledActions );
 $mediaWiki->setVal( 'DisableHardRedirects', $wgDisableHardRedirects );
 $mediaWiki->setVal( 'EnableCreativeCommonsRdf', $wgEnableCreativeCommonsRdf );
 $mediaWiki->setVal( 'EnableDublinCoreRdf', $wgEnableDublinCoreRdf );
-$mediaWiki->setVal( 'JobRunRate', $wgJobRunRate );
 $mediaWiki->setVal( 'Server', $wgServer );
 $mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage );
 $mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor );
@@ -104,5 +103,4 @@ $mediaWiki->setVal( 'UsePathInfo', $wgUsePathInfo );
 
 $mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest );
 $mediaWiki->finalCleanup( $wgOut );
-
 $mediaWiki->restInPeace();