No current need for an alias to getPath()
[lhc/web/wiklou.git] / skins / MonoBook.php
index 11052b7..6acce0f 100644 (file)
@@ -52,7 +52,12 @@ class SkinMonoBook extends SkinTemplate {
  * @ingroup Skins
  */
 class MonoBookTemplate extends BaseTemplate {
+
+       /**
+        * @var Skin
+        */
        var $skin;
+
        /**
         * Template filter callback for MonoBook skin.
         * Takes an associative array of data set from a SkinTemplate-based
@@ -62,10 +67,7 @@ class MonoBookTemplate extends BaseTemplate {
         * @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();
@@ -89,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'); } ?>
@@ -110,7 +114,7 @@ class MonoBookTemplate extends BaseTemplate {
        </div>
        <div class="portlet" id="p-logo">
                <?php
-                       $logoAttribs = array() + $skin->tooltipAndAccesskeyAttribs('p-logo');
+                       $logoAttribs = array() + Linker::tooltipAndAccesskeyAttribs('p-logo');
                        $logoAttribs['style'] = "background-image: url({$this->data['logopath']});";
                        $logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
                        echo Html::element( 'a', $logoAttribs );
@@ -210,12 +214,12 @@ class MonoBookTemplate extends BaseTemplate {
                                        $linkAttribs = array( 'href' => $tab['href'] );
                                        
                                        if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) {
-                                               $title = $skin->titleAttrib( "ca-$key" );
+                                               $title = Linker::titleAttrib( "ca-$key" );
                                                if ( $title !== false ) {
                                                        $linkAttribs['title'] = $title;
                                                }
                                        } else {
-                                               $linkAttribs += $skin->tooltipAndAccesskeyAttribs( "ca-$key" );
+                                               $linkAttribs += Linker::tooltipAndAccesskeyAttribs( "ca-$key" );
                                        }
                                        $linkHtml = Html::element( 'a', $linkAttribs, $tab['text'] );
                                        
@@ -277,14 +281,14 @@ class MonoBookTemplate extends BaseTemplate {
        /*************************************************************************************************/
        function customBox( $bar, $cont ) {
                $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
-               $tooltip = $this->skin->titleAttrib( "p-$bar" );
+               $tooltip = Linker::titleAttrib( "p-$bar" );
                if ( $tooltip !== false ) {
                        $portletAttribs['title'] = $tooltip;
                }
                echo '  ' . Html::openElement( 'div', $portletAttribs );
 ?>
 
-               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
+               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
                <div class='pBody'>
 <?php   if ( is_array( $cont ) ) { ?>
                        <ul>