Moved "printfooter" and debug HTML away from "bodytext" so that they can be easily...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 3 May 2011 17:23:17 +0000 (17:23 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 3 May 2011 17:23:17 +0000 (17:23 +0000)
includes/SkinLegacy.php
includes/SkinTemplate.php
skins/Modern.php
skins/MonoBook.php
skins/Vector.php

index 6c421ef..fc82834 100644 (file)
@@ -68,6 +68,10 @@ class LegacyTemplate extends BaseTemplate {
                $this->html( 'headelement' );
                echo $this->beforeContent();
                $this->html( 'bodytext' );
+               echo '<div class=\"printfooter\">';
+               $this->html( 'printfooter' );
+               echo '</div>';
+               $this->html( 'debughtml' );
                echo "\n";
                echo $this->afterContent();
                $this->html( 'dataAfterContent' );
index c346055..bc86944 100644 (file)
@@ -452,15 +452,13 @@ class SkinTemplate extends Skin {
                $tpl->set( 'reporttime', wfReportTime() );
                $tpl->set( 'sitenotice', $this->getSiteNotice() );
                $tpl->set( 'bottomscripts', $this->bottomScripts( $out ) );
+               $tpl->set( 'printfooter', $this->printSource() );
 
-               // @todo Give printfooter userlangattributes
-               $printfooter = "<div class=\"printfooter\">\n" . $this->printSource() . "</div>\n";
                global $wgBetterDirectionality;
                if ( $wgBetterDirectionality ) {
                        $realBodyAttribs = array( 'lang' => $wgLanguageCode, 'dir' => $wgContLang->getDir() );
                        $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
                }
-               $out->mBodytext .= $printfooter . $this->generateDebugHTML( $out );
                $tpl->setRef( 'bodytext', $out->mBodytext );
 
                # Language links
@@ -508,6 +506,8 @@ class SkinTemplate extends Skin {
                        $tpl->set( 'headscripts', $out->getScript() );
                }
 
+               $tpl->set( 'debughtml', $this->generateDebugHTML( $out ) );
+
                // original version by hansm
                if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {
                        wfDebug( __METHOD__ . ": Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" );
index 3998046..47882c1 100644 (file)
@@ -85,6 +85,8 @@ class ModernTemplate extends MonoBookTemplate {
                <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
 
                <?php $this->html('bodytext') ?>
+               <?php if($this->data['printfooter']) { ?><div class="printfooter"><?php $this->html('printfooter'); ?></div><?php } ?>
+               <?php $this->html('debughtml'); ?>
                <div class='mw_clear'></div>
                <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
                <?php $this->html ('dataAfterContent') ?>
index 20067a9..6acce0f 100644 (file)
@@ -91,6 +91,8 @@ class MonoBookTemplate extends BaseTemplate {
 <?php } ?>
                <!-- start content -->
 <?php $this->html('bodytext') ?>
+               <?php if($this->data['printfooter']) { ?><div class="printfooter"><?php $this->html('printfooter'); ?></div><?php } ?>
+               <?php $this->html('debughtml'); ?>
                <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
                <!-- end content -->
                <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
index 2b1ae43..3589a95 100644 (file)
@@ -177,6 +177,16 @@ class VectorTemplate extends BaseTemplate {
                                <!-- bodytext -->
                                <?php $this->html( 'bodytext' ) ?>
                                <!-- /bodytext -->
+                               <?php if ( $this->data['printfooter'] ): ?>
+                               <!-- printfooter -->
+                               <div class="printfooter">
+                               <?php $this->html( 'printfooter' ); ?>
+                               </div>
+                               <!-- /printfooter -->
+                               <?php endif; ?>
+                               <!-- debughtml -->
+                               <?php $this->html('debughtml'); ?>
+                               <!-- /debughtml -->
                                <?php if ( $this->data['catlinks'] ): ?>
                                <!-- catlinks -->
                                <?php $this->html( 'catlinks' ); ?>