r71540 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71539‎ | r71540 | r71541 >
Date:01:31, 24 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Update SkinAfterContent hook to pass the current skin too

So we don't need nasty $wgTitle globals
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1416,6 +1416,7 @@
14171417 'SkinAfterContent': Allows extensions to add text after the page content and
14181418 article metadata.
14191419 &$data: (string) Text to be printed out directly (without parsing)
 1420+$skin: Skin object
14201421 This hook should work in all skins. Just set the &$data variable to the text
14211422 you're going to add.
14221423
Index: trunk/phase3/includes/Skin.php
@@ -911,7 +911,7 @@
912912 protected function afterContentHook() {
913913 $data = '';
914914
915 - if( wfRunHooks( 'SkinAfterContent', array( &$data ) ) ) {
 915+ if( wfRunHooks( 'SkinAfterContent', array( &$data, $this ) ) ) {
916916 // adding just some spaces shouldn't toggle the output
917917 // of the whole <div/>, so we use trim() here
918918 if( trim( $data ) != '' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r71541Followup r71540...reedy01:37, 24 August 2010
r71542Followup r71540 with update to SkinAfterContentreedy01:40, 24 August 2010

Status & tagging log