From b61b27b6cfc751c0cc9bdffe6fa001af75817b75 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 11 Dec 2008 00:54:21 +0000 Subject: [PATCH] Revert r44381 "Remove noisy profiling" We... like profiling? :D --- includes/Wiki.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/Wiki.php b/includes/Wiki.php index f7c2723b64..3358b4d263 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -50,6 +50,7 @@ class MediaWiki { * @param $request WebRequest */ function initialize( &$title, &$article, &$output, &$user, $request ) { + wfProfileIn( __METHOD__ ); $this->preliminaryChecks( $title, $output, $request ) ; if( !$this->initializeSpecialCases( $title, $output, $request ) ) { $new_article = $this->initializeArticle( $title, $request ); @@ -59,9 +60,11 @@ class MediaWiki { } elseif( is_string( $new_article ) ) { $output->redirect( $new_article ); } else { + wfProfileOut( __METHOD__ ); throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" ); } } + wfProfileOut( __METHOD__ ); } /** @@ -129,6 +132,7 @@ class MediaWiki { * @param $request WebRequest */ function preliminaryChecks( &$title, &$output, $request ) { + if( $request->getCheck( 'search' ) ) { // Compatibility with old search URLs which didn't use Special:Search // Just check for presence here, so blank requests still @@ -137,6 +141,7 @@ class MediaWiki { // Do this above the read whitelist check for security... $title = SpecialPage::getTitleFor( 'Search' ); } + # If the user is not logged in, the Namespace:title of the article must be in # the Read array in order for the user to see it. (We have to check here to # catch special pages etc. We check again in Article::view()) @@ -145,6 +150,7 @@ class MediaWiki { $output->output(); exit; } + } /** @@ -414,7 +420,10 @@ class MediaWiki { * @param $request WebRequest */ function performAction( &$output, &$article, &$title, &$user, &$request ) { + wfProfileIn( __METHOD__ ); + if( !wfRunHooks( 'MediaWikiPerformAction', array( $output, $article, $title, $user, $request, $this ) ) ) { + wfProfileOut( __METHOD__ ); return; } @@ -505,6 +514,7 @@ class MediaWiki { $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); } } + wfProfileOut( __METHOD__ ); } -- 2.20.1