(bug 12064) BeforePageDisplay hook is now called for all skins
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 6 Apr 2008 20:25:45 +0000 (20:25 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 6 Apr 2008 20:25:45 +0000 (20:25 +0000)
RELEASE-NOTES
includes/OutputPage.php
includes/SkinTemplate.php

index 395ec3e..12b628e 100644 (file)
@@ -158,6 +158,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13463) Login successful page doesn't use user's preferred interface language
 * (bug 13630) Fixed warnings for pass by reference at call time in
   Special:Revisiondelete when generating the log entry.
+* (bug 12064) BeforePageDisplay hook is now called for all skins
 
 === API changes in 1.13 ===
 
index 2f8bf10..48302c0 100644 (file)
@@ -779,6 +779,10 @@ class OutputPage {
                if ($this->mArticleBodyOnly) {
                        $this->out($this->mBodytext);
                } else {
+                       // Hook that allows last minute changes to the output page, e.g.
+                       // adding of CSS or Javascript by extensions.
+                       wfRunHooks( 'BeforePageDisplay', array( &$this ) );
+
                        wfProfileIn( 'Output-skin' );
                        $sk->outputPage( $this );
                        wfProfileOut( 'Output-skin' );
index 22fefb5..afa96c3 100644 (file)
@@ -139,10 +139,6 @@ class SkinTemplate extends Skin {
                $fname = 'SkinTemplate::outputPage';
                wfProfileIn( $fname );
 
-               // Hook that allows last minute changes to the output page, e.g.
-               // adding of CSS or Javascript by extensions.
-               wfRunHooks( 'BeforePageDisplay', array( &$out ) );
-
                $oldid = $wgRequest->getVal( 'oldid' );
                $diff = $wgRequest->getVal( 'diff' );