Fix Ibcb23c81, and tweak array merge order
[lhc/web/wiklou.git] / skins / Modern.php
index 9b85064..4211bb8 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * Modern skin, derived from monobook template.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @todo document
  * @file
  * @ingroup Skins
@@ -10,8 +25,6 @@
 if( !defined( 'MEDIAWIKI' ) )
        die( -1 );
 
-require( dirname(__FILE__) . '/MonoBook.php' );
-
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
  * @todo document
@@ -36,10 +49,6 @@ class SkinModern extends SkinTemplate {
  */
 class ModernTemplate extends MonoBookTemplate {
 
-       /**
-        * @var Skin
-        */
-       var $skin;
        /**
         * Template filter callback for Modern skin.
         * Takes an associative array of data set from a SkinTemplate-based
@@ -49,8 +58,6 @@ class ModernTemplate extends MonoBookTemplate {
         * @access private
         */
        function execute() {
-               $this->skin = $skin = $this->data['skin'];
-
                // Suppress warnings to prevent notices about missing indexes in $this->data
                wfSuppressWarnings();
 
@@ -58,19 +65,19 @@ class ModernTemplate extends MonoBookTemplate {
 ?>
 
        <!-- heading -->
-       <div id="mw_header"><h1 id="firstHeading"><?php $this->html('title') ?></h1></div>
+       <div id="mw_header"><h1 id="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
 
        <div id="mw_main">
        <div id="mw_contentwrapper">
        <!-- navigation portlet -->
-<?php $this->cactions( $skin ); ?>
+<?php $this->cactions(); ?>
 
        <!-- content -->
        <div id="mw_content">
        <!-- contentholder does nothing by default, but it allows users to style the text inside
             the content area without affecting the meaning of 'em' in #mw_content, which is used
             for the margins -->
-       <div id="mw_contentholder" <?php $this->html("specialpageattributes") ?>>
+       <div id="mw_contentholder" class="mw-body">
                <div class='mw-topboxes'>
                        <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes')?>></div>
                        <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
@@ -85,11 +92,9 @@ class ModernTemplate extends MonoBookTemplate {
                <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
 
                <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
-               <?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 if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><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') ?>
@@ -139,7 +144,7 @@ class ModernTemplate extends MonoBookTemplate {
                        <div id="mw_<?php echo htmlspecialchars($blockName); ?>">
 <?php
                        foreach ( $footerIcons as $icon ) { ?>
-                               <?php echo $this->skin->makeFooterIcon( $icon, 'withoutImage' ); ?>
+                               <?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
 
 <?php
                        } ?>