Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -587,9 +587,9 @@ |
588 | 588 | Change $bad and return false to override. If an image is "bad", it is not |
589 | 589 | rendered inline in wiki pages or galleries in category pages. |
590 | 590 | |
591 | | -'BeforeInitialize': before anything is initialized in performRequestForTitle() |
| 591 | +'BeforeInitialize': before anything is initialized in MediaWiki::performRequest() |
592 | 592 | &$title: Title being used for request |
593 | | -&$article: The associated Article object |
| 593 | +$unused: null |
594 | 594 | &$output: OutputPage object |
595 | 595 | &$user: User |
596 | 596 | $request: WebRequest object |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -146,6 +146,9 @@ |
147 | 147 | $output->setPrintable(); |
148 | 148 | } |
149 | 149 | |
| 150 | + $unused = null; // To pass it by reference |
| 151 | + wfRunHooks( 'BeforeInitialize', array( &$title, &$unused, &$output, &$user, $request, $this ) ); |
| 152 | + |
150 | 153 | // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty. |
151 | 154 | if ( is_null( $title ) || ( $title->getDBkey() == '' && $title->getInterwiki() == '' ) || |
152 | 155 | $title->isSpecial( 'Badtitle' ) ) |
— | — | @@ -267,8 +270,6 @@ |
268 | 271 | wfProfileOut( __METHOD__ ); |
269 | 272 | throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" ); |
270 | 273 | } |
271 | | - wfRunHooks( 'BeforeInitialize', |
272 | | - array( &$title, &$article, &$output, &$user, $request, $this ) ); |
273 | 274 | } |
274 | 275 | |
275 | 276 | if ( $pageView ) { |