X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=index.php;h=50c2ef5421cb41a23817d0545790ca74ca115fe9;hb=7d7d6cb56a001c74f3b8103aea73513837f12ce9;hp=ff1bd0de9c45c4232ecc6bfa17436bffd8b5ecdb;hpb=56a0a92abb16e060a9ef45a57ad5c099329c403e;p=lhc%2Fweb%2Fwiklou.git diff --git a/index.php b/index.php index ff1bd0de9c..50c2ef5421 100644 --- a/index.php +++ b/index.php @@ -38,14 +38,14 @@ */ # Initialise common code -$preIP = dirname( __FILE__ ); -require_once( "$preIP/includes/WebStart.php" ); +require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); + +wfProfileIn( 'index.php' ); +wfProfileIn( 'index.php-setup' ); # Initialize MediaWiki base class $mediaWiki = new MediaWiki(); -wfProfileIn( 'main-misc-setup' ); - $maxLag = $wgRequest->getVal( 'maxlag' ); if( !is_null( $maxLag ) && !$mediaWiki->checkMaxLag( $maxLag ) ) { exit; @@ -53,21 +53,21 @@ if( !is_null( $maxLag ) && !$mediaWiki->checkMaxLag( $maxLag ) ) { # Set title from request parameters $wgTitle = $mediaWiki->checkInitialQueries( $wgRequest ); - -wfProfileOut( 'main-misc-setup' ); - $action = $wgRequest->getVal( 'action', 'view' ); +wfProfileOut( 'index.php-setup' ); + # Send Ajax requests to the Ajax dispatcher. if( $wgUseAjax && $action == 'ajax' ) { $dispatcher = new AjaxDispatcher(); $dispatcher->performAction(); + wfProfileOut( 'index.php' ); $mediaWiki->restInPeace(); exit; } if( $wgUseFileCache && $wgTitle !== null ) { - wfProfileIn( 'main-try-filecache' ); + wfProfileIn( 'index.php-filecache' ); // Raw pages should handle cache control on their own, // even when using file cache. This reduces hits from clients. if( $action != 'raw' && HTMLFileCache::useFileCache() ) { @@ -83,13 +83,14 @@ if( $wgUseFileCache && $wgTitle !== null ) { $wgArticle->viewUpdates(); # Tell $wgOut that output is taken care of $wgOut->disable(); - wfProfileOut( 'main-try-filecache' ); + wfProfileOut( 'index.php-filecache' ); $mediaWiki->finalCleanup( $wgOut ); + wfProfileOut( 'index.php' ); $mediaWiki->restInPeace(); exit; } } - wfProfileOut( 'main-try-filecache' ); + wfProfileOut( 'index.php-filecache' ); } # Setting global variables in mediaWiki @@ -103,4 +104,7 @@ $mediaWiki->setVal( 'UsePathInfo', $wgUsePathInfo ); $mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest ); $mediaWiki->finalCleanup( $wgOut ); + +wfProfileOut( 'index.php' ); + $mediaWiki->restInPeace();