Merge "Remove the space from between headline and its section edit link"
[lhc/web/wiklou.git] / skins / CologneBlue.php
index 21b07f7..d766b64 100644 (file)
@@ -22,7 +22,7 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
 }
 
@@ -39,7 +39,7 @@ class SkinCologneBlue extends SkinTemplate {
         * @param $out OutputPage
         */
        function setupSkinUserCss( OutputPage $out ) {
-               $out->addModuleStyles( 'mediawiki.legacy.shared' );
+               parent::setupSkinUserCss( $out );
                $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
                $out->addModuleStyles( 'skins.cologneblue' );
        }
@@ -127,7 +127,7 @@ class CologneBlueTemplate extends BaseTemplate {
         *
         * @return string
         */
-       function processBottomLink( $key, $navlink, $message=null ) {
+       function processBottomLink( $key, $navlink, $message = null ) {
                if ( !$navlink ) {
                        // Empty navlinks might be passed.
                        return null;
@@ -202,7 +202,7 @@ class CologneBlueTemplate extends BaseTemplate {
                $companionTitle = $title->isTalkPage() ? $title->getSubjectPage() : $title->getTalkPage();
                $companionNamespace = $companionTitle->getNamespace();
 
-               // TODO these messages appear to only be used by CologneBlue and legacy skins,
+               // TODO these messages are only be used by CologneBlue,
                // kill and replace with something more sensibly named?
                $nsToMessage = array(
                        NS_MAIN => 'articlepage',
@@ -234,7 +234,7 @@ class CologneBlueTemplate extends BaseTemplate {
 
                // Use the regular navigational link, but replace its text. Everything else stays unmodified.
                $namespacesLinks = $this->data['content_navigation']['namespaces'];
-               return $this->processBottomLink( $message,  $namespacesLinks[$key], $message );
+               return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
        }
 
        /**
@@ -246,7 +246,7 @@ class CologneBlueTemplate extends BaseTemplate {
         * @param $navlink array Navigational link generated by SkinTemplate
         * @param $idPrefix mixed Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
         */
-       function processNavlinkForDocument( $navlink, $idPrefix='cb-' ) {
+       function processNavlinkForDocument( $navlink, $idPrefix = 'cb-' ) {
                if ( $navlink['id'] ) {
                        $navlink['single-id'] = $navlink['id']; // to allow for tooltip generation
                        $navlink['tooltiponly'] = true; // but no accesskeys
@@ -255,7 +255,7 @@ class CologneBlueTemplate extends BaseTemplate {
                        if ( $idPrefix === false ) {
                                unset( $navlink['id'] );
                        } else {
-                               $navlink['id'] =  $idPrefix . $navlink['id'];
+                               $navlink['id'] = $idPrefix . $navlink['id'];
                        }
                }
 
@@ -316,7 +316,8 @@ class CologneBlueTemplate extends BaseTemplate {
                ob_start();
 ?>
        </div>
-       <div id="footer" role="contentinfo">
+       <div id="footer">
+               <div id="footer-navigation" role="navigation">
 <?php
                // Page-related links
                echo $this->bottomLinks();
@@ -328,8 +329,10 @@ class CologneBlueTemplate extends BaseTemplate {
                        $this->getSkin()->aboutLink(),
                        $this->searchForm( 'footer' )
                ) );
-               echo "\n<br />";
-
+?>
+               </div>
+               <div id="footer-info" role="contentinfo">
+<?php
                // Standard footer info
                $footlinks = $this->getFooterLinks();
                if ( $footlinks['info'] ) {
@@ -338,6 +341,7 @@ class CologneBlueTemplate extends BaseTemplate {
                        }
                }
 ?>
+               </div>
        </div>
 </div>
 <div id="mw-navigation">
@@ -376,7 +380,7 @@ class CologneBlueTemplate extends BaseTemplate {
                );
 
                $personalUrls = $this->getPersonalTools();
-               foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+               foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
                        if ( $personalUrls[$key] ) {
                                $s[] = $this->makeListItem( $key, $personalUrls[$key], array( 'tag' => 'span' ) );
                        }
@@ -417,7 +421,7 @@ class CologneBlueTemplate extends BaseTemplate {
 
                // Personal tools ("My pages")
                $qbmyoptions = $this->getPersonalTools();
-               foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+               foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
                        $qbmyoptions[$key] = null;
                }
 
@@ -532,17 +536,17 @@ class CologneBlueTemplate extends BaseTemplate {
 
                $search = $this->getSkin()->getRequest()->getText( 'search' );
                $action = $this->data['searchaction'];
-               $s = "<form id=\"searchform-" . htmlspecialchars($which) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
-               if( $which == 'footer' ) {
+               $s = "<form id=\"searchform-" . htmlspecialchars( $which ) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
+               if ( $which == 'footer' ) {
                        $s .= wfMessage( 'qbfind' )->text() . ": ";
                }
 
                $s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
                        . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
-                       . ($which == 'footer' ? " " : "<br />")
+                       . ( $which == 'footer' ? " " : "<br />" )
                        . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
 
-               if( $wgUseTwoButtonsSearchForm ) {
+               if ( $wgUseTwoButtonsSearchForm ) {
                        $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
                } else {
                        $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";