From b5125bffc7c207c06fa7c8d1220d36bc4e130789 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 7 Apr 2008 17:53:31 +0000 Subject: [PATCH] Added parameter to BeforePageDisplay hook so that extension can use it to modify it. See my next commit for an inplementation of it. --- docs/hooks.txt | 3 ++- includes/OutputPage.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index d6379af40d..db9d542b60 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 48302c03e0..482174be4b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 ); -- 2.20.1