diff options
Diffstat (limited to 'skins/CologneBlue.php')
-rw-r--r-- | skins/CologneBlue.php | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 21b07f7d..0370e05b 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -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']; } } @@ -290,8 +290,8 @@ class CologneBlueTemplate extends BaseTemplate { <div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div> <?php } ?> <h1 id="firstHeading" lang="<?php - $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode(); - $this->html( 'pageLanguage' ); + $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode(); + $this->text( 'pageLanguage' ); ?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1> <?php if ( $this->translator->translate( 'tagline' ) ) { ?> <p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p> @@ -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,18 +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 />") - . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />"; + $s .= $this->makeSearchInput( array( 'class' => 'mw-searchInput', 'type' => 'text', 'size' => '14' ) ); + $s .= ( $which == 'footer' ? " " : "<br />" ); + $s .= $this->makeSearchButton( 'go', array( 'class' => 'searchButton' ) ); - if( $wgUseTwoButtonsSearchForm ) { - $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n"; + if ( $wgUseTwoButtonsSearchForm ) { + $s .= $this->makeSearchButton( 'fulltext', array( 'class' => 'searchButton' ) ); } else { $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n"; } |