Added parameter to BeforePageDisplay hook so that extension can use it to modify...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 7 Apr 2008 17:53:31 +0000 (17:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 7 Apr 2008 17:53:31 +0000 (17:53 +0000)
docs/hooks.txt
includes/OutputPage.php

index d6379af..db9d542 100644 (file)
@@ -429,7 +429,8 @@ rendered inline in wiki pages or galleries in category pages.
 &$time: image timestamp
 
 'BeforePageDisplay': Prior to outputting a page
-$out: OutputPage object
+&$out: OutputPage object
+&$skin: Skin object
 
 'BeforeParserFetchTemplateAndtitle': before a template is fetched by Parser
 &$parser: Parser object
index 48302c0..482174b 100644 (file)
@@ -781,7 +781,7 @@ class OutputPage {
                } else {
                        // Hook that allows last minute changes to the output page, e.g.
                        // adding of CSS or Javascript by extensions.
-                       wfRunHooks( 'BeforePageDisplay', array( &$this ) );
+                       wfRunHooks( 'BeforePageDisplay', array( &$this, &$sk ) );
 
                        wfProfileIn( 'Output-skin' );
                        $sk->outputPage( $this );