Selectors go from right to left. Starting with a generic 'a' is kind of slow. Also...
[lhc/web/wiklou.git] / skins / Modern.php
index 6c315b9..3998046 100644 (file)
@@ -32,6 +32,10 @@ class SkinModern extends SkinTemplate {
  * @ingroup Skins
  */
 class ModernTemplate extends MonoBookTemplate {
+
+       /**
+        * @var Skin
+        */
        var $skin;
        /**
         * Template filter callback for Modern skin.
@@ -42,9 +46,7 @@ class ModernTemplate extends MonoBookTemplate {
         * @access private
         */
        function execute() {
-               global $wgRequest;
                $this->skin = $skin = $this->data['skin'];
-               $action = $wgRequest->getText( 'action' );
 
                // Suppress warnings to prevent notices about missing indexes in $this->data
                wfSuppressWarnings();
@@ -58,27 +60,7 @@ class ModernTemplate extends MonoBookTemplate {
        <div id="mw_main">
        <div id="mw_contentwrapper">
        <!-- navigation portlet -->
-       <div id="p-cactions" class="portlet">
-               <h5><?php $this->msg('views') ?></h5>
-               <div class="pBody">
-                       <ul>
-       <?php           foreach($this->data['content_actions'] as $key => $tab) {
-                                       echo '
-                                <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"';
-                                       if( $tab['class'] ) {
-                                               echo ' class="'.htmlspecialchars($tab['class']).'"';
-                                       }
-                                       echo'><a href="'.htmlspecialchars($tab['href']).'"';
-                                       if( isset($tab["tooltiponly"]) && $tab["tooltiponly"] ) {
-                                               echo $skin->tooltip( "ca-$key" );
-                                       } else {
-                                               echo $skin->tooltipAndAccesskey( "ca-$key" );
-                                       }
-                                       echo '>'.htmlspecialchars($tab['text']).'</a></li>';
-                               } ?>
-                       </ul>
-               </div>
-       </div>
+<?php $this->cactions( $skin ); ?>
 
        <!-- content -->
        <div id="mw_content">