From b31d0cb7583f1ab1b0d6120da5f8452d5d7da4b0 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 24 Aug 2010 01:31:28 +0000 Subject: [PATCH] Update SkinAfterContent hook to pass the current skin too So we don't need nasty $wgTitle globals --- docs/hooks.txt | 1 + includes/Skin.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index b0ae26ff2d..6c26a1f1e8 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1416,6 +1416,7 @@ Append to $text to add additional text/scripts after the stock bottom scripts. 'SkinAfterContent': Allows extensions to add text after the page content and article metadata. &$data: (string) Text to be printed out directly (without parsing) +$skin: Skin object This hook should work in all skins. Just set the &$data variable to the text you're going to add. diff --git a/includes/Skin.php b/includes/Skin.php index f000fbfffe..99926b70ae 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -911,7 +911,7 @@ CSS; protected function afterContentHook() { $data = ''; - if( wfRunHooks( 'SkinAfterContent', array( &$data ) ) ) { + if( wfRunHooks( 'SkinAfterContent', array( &$data, $this ) ) ) { // adding just some spaces shouldn't toggle the output // of the whole
, so we use trim() here if( trim( $data ) != '' ) { -- 2.20.1