Update SkinAfterContent hook to pass the current skin too
authorSam Reed <reedy@users.mediawiki.org>
Tue, 24 Aug 2010 01:31:28 +0000 (01:31 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 24 Aug 2010 01:31:28 +0000 (01:31 +0000)
So we don't need nasty $wgTitle globals

docs/hooks.txt
includes/Skin.php

index b0ae26f..6c26a1f 100644 (file)
@@ -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.
 
index f000fbf..99926b7 100644 (file)
@@ -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 <div/>, so we use trim() here
                        if( trim( $data ) != '' ) {