- $this->preliminaryChecks( $title, $output, $request );
- if( !$this->initializeSpecialCases( $title, $output, $request ) ) {
- $new_article = $this->initializeArticle( $title, $request );
+
+ $output->setTitle( $title );
+
+ wfRunHooks( 'BeforeInitialize', array( &$title, &$article, &$output, &$user, $request, $this ) );
+
+ if( !$this->preliminaryChecks( $title, $output, $request ) ) {
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+ // Call handleSpecialCases() to deal with all special requests...
+ if( !$this->handleSpecialCases( $title, $output, $request ) ) {
+ // ...otherwise treat it as an article view. The article
+ // may be a redirect to another article or URL.
+ $new_article = $this->initializeArticle( $title, $output, $request );