From: Daniel Friesen Date: Sun, 4 Sep 2011 12:38:04 +0000 (+0000) Subject: Followup r87340: Post-hook swap bodytext into a new bodycontent key and append printf... X-Git-Tag: 1.31.0-rc.0~27927 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=bd756e66843bd1f346ebfed21d11996fde92ba62;p=lhc%2Fweb%2Fwiklou.git Followup r87340: Post-hook swap bodytext into a new bodycontent key and append printfooter and debughtml to bodytext so that we get the same behaviour as before for skins, the advantage of letting extensions modify them separately, and let skins opt-in to the ability to display these separately. --- diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index 6fbb4659cf..f8ff1e3b35 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -74,10 +74,6 @@ class LegacyTemplate extends BaseTemplate { $this->html( 'headelement' ); echo $this->beforeContent(); $this->html( 'bodytext' ); - echo '
'; - $this->html( 'printfooter' ); - echo '
'; - $this->html( 'debughtml' ); echo "\n"; echo $this->afterContent(); $this->html( 'dataAfterContent' ); diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 4bc77d3f43..f66eddf2a3 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -483,6 +483,15 @@ class SkinTemplate extends Skin { wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" ); } + // Set the bodytext to another key so that skins can just output it on it's own + // and output printfooter and debughtml separately + $tpl->set( 'bodycontent', $tpl->data['bodytext'] ); + + // Append printfooter and debughtml onto bodytext so that skins that were already + // using bodytext before they were split out don't suddenly start not outputting information + $tpl->data['bodytext'] .= Html::element( 'div', array( 'class' => 'printfooter' ), "\n{$tpl->data['printfooter']}" ) . "\n"; + $tpl->data['bodytext'] .= $tpl->data['debughtml']; + // allow extensions adding stuff after the page content. // See Skin::afterContentHook() for further documentation. $tpl->set( 'dataAfterContent', $this->afterContentHook() ); diff --git a/skins/Modern.php b/skins/Modern.php index 02e3b0af8c..151fece572 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -88,8 +88,6 @@ class ModernTemplate extends MonoBookTemplate { data['showjumplinks']) { ?>
msg('jumpto') ?> msg('jumptonavigation') ?>, msg('jumptosearch') ?>
html('bodytext') ?> - data['printfooter']) { ?>
html('printfooter'); ?>
- html('debughtml'); ?>
data['catlinks']) { $this->html('catlinks'); } ?> html ('dataAfterContent') ?> diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 47122756e3..c696418ba4 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -91,8 +91,6 @@ class MonoBookTemplate extends BaseTemplate { html('bodytext') ?> - data['printfooter']) { ?>
html('printfooter'); ?>
- html('debughtml'); ?> data['catlinks']) { $this->html('catlinks'); } ?> data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> diff --git a/skins/Vector.php b/skins/Vector.php index be4638d26c..a57d2cdbf7 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -174,9 +174,9 @@ class VectorTemplate extends BaseTemplate { - - html( 'bodytext' ) ?> - + + html( 'bodycontent' ) ?> + data['printfooter'] ): ?>