* church of emacs, Emufarmers, Juliano F. Ravasi and Matěj Grabovský are now developers
[lhc/web/wiklou.git] / index.php
index b95f980..bbc77e5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -32,6 +32,8 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
  */
 
 
@@ -47,7 +49,12 @@ wfProfileIn( 'main-misc-setup' );
 OutputPage::setEncodings(); # Not really used yet
 
 $maxLag = $wgRequest->getVal( 'maxlag' );
-if( !is_null($maxLag) && !$mediaWiki->checkMaxLag( $maxLag ) ) {
+if( !is_null( $maxLag ) && !$mediaWiki->checkMaxLag( $maxLag ) ) {
+       exit;
+}
+
+$avgLag = $wgRequest->getVal( 'avglag' );
+if( !is_null( $avgLag ) && !$mediaWiki->checkAvgLag( $avgLag ) ) {
        exit;
 }
 
@@ -55,6 +62,7 @@ if( !is_null($maxLag) && !$mediaWiki->checkMaxLag( $maxLag ) ) {
 $action = $wgRequest->getVal( 'action', 'view' );
 $title = $wgRequest->getVal( 'title' );
 
+# Set title from request parameters
 $wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
 if( $wgTitle === NULL ) {
        unset( $wgTitle );
@@ -73,7 +81,7 @@ if( $wgUseAjax && $action == 'ajax' ) {
        exit;
 }
 
-if( $wgUseFileCache && isset($wgTitle) ) {
+if( $wgUseFileCache && isset( $wgTitle ) ) {
        wfProfileIn( 'main-try-filecache' );
        // Raw pages should handle cache control on their own,
        // even when using file cache. This reduces hits from clients.
@@ -111,7 +119,7 @@ $mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage );
 $mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor );
 $mediaWiki->setVal( 'UsePathInfo', $wgUsePathInfo );
 
-$mediaWiki->initialize( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest );
+$mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest );
 $mediaWiki->finalCleanup( $wgDeferredUpdateList, $wgOut );
 
 # Not sure when $wgPostCommitUpdateList gets set, so I keep this separate from finalCleanup