*/
# 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;
# 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() ) {
$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
$mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest );
$mediaWiki->finalCleanup( $wgOut );
+
+wfProfileOut( 'index.php' );
+
$mediaWiki->restInPeace();