Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -50,6 +50,7 @@ |
51 | 51 | * @param $request WebRequest |
52 | 52 | */ |
53 | 53 | function initialize( &$title, &$article, &$output, &$user, $request ) { |
| 54 | + wfProfileIn( __METHOD__ ); |
54 | 55 | $this->preliminaryChecks( $title, $output, $request ) ; |
55 | 56 | if( !$this->initializeSpecialCases( $title, $output, $request ) ) { |
56 | 57 | $new_article = $this->initializeArticle( $title, $request ); |
— | — | @@ -59,9 +60,11 @@ |
60 | 61 | } elseif( is_string( $new_article ) ) { |
61 | 62 | $output->redirect( $new_article ); |
62 | 63 | } else { |
| 64 | + wfProfileOut( __METHOD__ ); |
63 | 65 | throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" ); |
64 | 66 | } |
65 | 67 | } |
| 68 | + wfProfileOut( __METHOD__ ); |
66 | 69 | } |
67 | 70 | |
68 | 71 | /** |
— | — | @@ -129,6 +132,7 @@ |
130 | 133 | * @param $request WebRequest |
131 | 134 | */ |
132 | 135 | function preliminaryChecks( &$title, &$output, $request ) { |
| 136 | + |
133 | 137 | if( $request->getCheck( 'search' ) ) { |
134 | 138 | // Compatibility with old search URLs which didn't use Special:Search |
135 | 139 | // Just check for presence here, so blank requests still |
— | — | @@ -137,6 +141,7 @@ |
138 | 142 | // Do this above the read whitelist check for security... |
139 | 143 | $title = SpecialPage::getTitleFor( 'Search' ); |
140 | 144 | } |
| 145 | + |
141 | 146 | # If the user is not logged in, the Namespace:title of the article must be in |
142 | 147 | # the Read array in order for the user to see it. (We have to check here to |
143 | 148 | # catch special pages etc. We check again in Article::view()) |
— | — | @@ -145,6 +150,7 @@ |
146 | 151 | $output->output(); |
147 | 152 | exit; |
148 | 153 | } |
| 154 | + |
149 | 155 | } |
150 | 156 | |
151 | 157 | /** |
— | — | @@ -414,7 +420,10 @@ |
415 | 421 | * @param $request WebRequest |
416 | 422 | */ |
417 | 423 | function performAction( &$output, &$article, &$title, &$user, &$request ) { |
| 424 | + wfProfileIn( __METHOD__ ); |
| 425 | + |
418 | 426 | if( !wfRunHooks( 'MediaWikiPerformAction', array( $output, $article, $title, $user, $request, $this ) ) ) { |
| 427 | + wfProfileOut( __METHOD__ ); |
419 | 428 | return; |
420 | 429 | } |
421 | 430 | |
— | — | @@ -505,6 +514,7 @@ |
506 | 515 | $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); |
507 | 516 | } |
508 | 517 | } |
| 518 | + wfProfileOut( __METHOD__ ); |
509 | 519 | |
510 | 520 | } |
511 | 521 | |