Migrate skins/common/search.js functionality to mediawiki.special.search.js. Make...
[lhc/web/wiklou.git] / skins / Modern.php
index 017be88..02e3b0a 100644 (file)
@@ -21,6 +21,9 @@ class SkinModern extends SkinTemplate {
        var $skinname = 'modern', $stylename = 'modern',
                $template = 'ModernTemplate', $useHeadElement = true;
 
+       /**
+        * @param $out OutputPage
+        */
        function setupSkinUserCss( OutputPage $out ){
                parent::setupSkinUserCss( $out );
                $out->addModuleStyles ('skins.modern');
@@ -46,7 +49,6 @@ class ModernTemplate extends MonoBookTemplate {
         * @access private
         */
        function execute() {
-               global $wgRequest;
                $this->skin = $skin = $this->data['skin'];
 
                // Suppress warnings to prevent notices about missing indexes in $this->data
@@ -61,14 +63,14 @@ class ModernTemplate extends MonoBookTemplate {
        <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">
                <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>
@@ -86,6 +88,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') ?>
@@ -96,24 +100,7 @@ class ModernTemplate extends MonoBookTemplate {
        <div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
 
        <!-- portlets -->
-       <?php
-               $sidebar = $this->data['sidebar'];
-               if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
-               if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
-               if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
-
-               foreach ($sidebar as $boxName => $cont) {
-                       if ( $boxName == 'SEARCH' ) {
-                               $this->searchBox();
-                       } elseif ( $boxName == 'TOOLBOX' ) {
-                               $this->toolbox();
-                       } elseif ( $boxName == 'LANGUAGES' ) {
-                               $this->languageBox();
-                       } else {
-                               $this->customBox( $boxName, $cont );
-                       }
-               }
-       ?>
+       <?php $this->renderPortals( $this->data['sidebar'] ); ?>
 
        </div><!-- mw_portlets -->