<?php
/**
- * @defgroup Skins Skins
+ * Base class for legacy skins.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 1 );
-}
-
class SkinLegacy extends SkinTemplate {
var $useHeadElement = true;
protected $mWatchLinkNum = 0; // Appended to end of watch link id's
$s = implode( $element, $sep );
- if ( $title->getArticleId() ) {
+ if ( $title->getArticleID() ) {
$s .= "\n<br />";
// Delete/protect/move links for privileged users
}
function otherLanguages() {
- global $wgOut, $wgLang, $wgContLang, $wgHideInterlanguageLinks;
+ global $wgOut, $wgLang, $wgHideInterlanguageLinks;
if ( $wgHideInterlanguageLinks ) {
return '';
$first = false;
$nt = Title::newFromText( $l );
- $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
+ $text = Language::fetchLanguageName( $nt->getInterwiki() );
$s .= Html::element( 'a',
array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ),
$diff = $wgRequest->getVal( 'diff' );
$title = $this->getSkin()->getTitle();
- if ( $title->getArticleId() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
+ if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
$t = wfMsg( 'deletethispage' );
$s = Linker::linkKnown(
$diff = $wgRequest->getVal( 'diff' );
$title = $this->getSkin()->getTitle();
- if ( $title->getArticleId() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
+ if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
if ( $title->isProtected() ) {
$text = wfMsg( 'unprotectthispage' );
$query = array( 'action' => 'unprotect' );
global $wgOut;
if ( !$wgOut->isArticleRelated() ) {
- return '(' . wfMsg( 'notanarticle' ) . ')';
+ return wfMessage( 'parentheses', wfMessage( 'notanarticle' )->text() )->escaped();
} else {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
$talkLink = Linker::link( $wgUser->getTalkPage(),
$wgLang->getNsText( NS_TALK ) );
+ $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
- $ret .= "$name ($talkLink)";
+ $ret .= "$name $talkLink";
} else {
$ret .= wfMsg( 'notloggedin' );
}
} else {
$talkLink = Linker::link( $wgUser->getTalkPage(),
$wgLang->getNsText( NS_TALK ) );
+ $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped();
$ret .= Linker::link( $wgUser->getUserPage(),
htmlspecialchars( $wgUser->getName() ) );
- $ret .= " ($talkLink)<br />";
+ $ret .= " $talkLink<br />";
$ret .= $wgLang->pipeList( array(
Linker::link(
SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
return $ret;
}
-
}
-