From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- skins/CologneBlue.php | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'skins/CologneBlue.php') 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 {
getSkin()->getSiteNotice() ?>

data['title'] ?>

translator->translate( 'tagline' ) ) { ?>

translator->translate( 'tagline' ) ) ?>

@@ -316,7 +316,8 @@ class CologneBlueTemplate extends BaseTemplate { ob_start(); ?> -
@@ -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 = "
"; - if( $which == 'footer' ) { + $s = ""; + if ( $which == 'footer' ) { $s .= wfMessage( 'qbfind' )->text() . ": "; } - $s .= "" - . ($which == 'footer' ? " " : "
") - . "escaped() . "\" />"; + $s .= $this->makeSearchInput( array( 'class' => 'mw-searchInput', 'type' => 'text', 'size' => '14' ) ); + $s .= ( $which == 'footer' ? " " : "
" ); + $s .= $this->makeSearchButton( 'go', array( 'class' => 'searchButton' ) ); - if( $wgUseTwoButtonsSearchForm ) { - $s .= " escaped() . "\" />\n"; + if ( $wgUseTwoButtonsSearchForm ) { + $s .= $this->makeSearchButton( 'fulltext', array( 'class' => 'searchButton' ) ); } else { $s .= '
\n"; } -- cgit v1.2.3-54-g00ecf