I'll be amazed if this doens't break any tests.
*
* @file
*/
-abstract class Action {
+abstract class Action extends ContextSource {
/**
* Page on which we're performing the action
return self::getClass( $name, array() ) !== null;
}
- /**
- * Get the IContextSource in use here
- * @return IContextSource
- */
- public final function getContext() {
- if ( $this->context instanceof IContextSource ) {
- return $this->context;
- }
- return $this->page->getContext();
- }
-
- /**
- * Get the WebRequest being used for this instance
- *
- * @return WebRequest
- */
- public final function getRequest() {
- return $this->getContext()->getRequest();
- }
-
- /**
- * Get the OutputPage being used for this instance
- *
- * @return OutputPage
- */
- public final function getOutput() {
- return $this->getContext()->getOutput();
- }
-
- /**
- * Shortcut to get the User being used for this instance
- *
- * @return User
- */
- public final function getUser() {
- return $this->getContext()->getUser();
- }
-
- /**
- * Shortcut to get the Skin being used for this instance
- *
- * @return Skin
- */
- public final function getSkin() {
- return $this->getContext()->getSkin();
- }
-
- /**
- * Shortcut to get the user Language being used for this instance
- *
- * @return Skin
- */
- public final function getLang() {
- return $this->getContext()->getLang();
- }
-
- /**
- * Shortcut to get the Title object from the page
- * @return Title
- */
- public final function getTitle() {
- return $this->page->getTitle();
- }
-
- /**
- * Get a Message object with context set
- * Parameters are the same as wfMessage()
- *
- * @return Message object
- */
- public final function msg() {
- $params = func_get_args();
- return call_user_func_array( array( $this->getContext(), 'msg' ), $params );
- }
-
/**
* Protected constructor: use Action::factory( $action, $page ) to actually build
* these things in the real world
protected function showCssOrJsPage() {
global $wgOut;
- $dir = $this->getContext()->getLang()->getDir();
- $lang = $this->getContext()->getLang()->getCode();
+ $dir = $this->getContext()->getLanguage()->getDir();
+ $lang = $this->getContext()->getLanguage()->getCode();
$wgOut->wrapWikiMsg( "<div id='mw-clearyourcache' lang='$lang' dir='$dir' class='mw-content-$dir'>\n$1\n</div>",
'clearyourcache' );
$r = wfMsgExt( 'category-empty', array( 'parse' ) );
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$langAttribs = array( 'lang' => $lang->getCode(), 'dir' => $lang->getDir() );
# put a div around the headings which are in the user language
$r = Html::openElement( 'div', $langAttribs ) . $r . '</div>';
public function insertDateHeader( &$s, $rc_timestamp ) {
# Make date header if necessary
- $date = $this->getLang()->date( $rc_timestamp, true, true );
+ $date = $this->getLanguage()->date( $rc_timestamp, true, true );
if( $date != $this->lastdate ) {
if( $this->lastdate != '' ) {
$s .= "</ul>\n";
$articlelink = "<strong class=\"mw-watched\">{$articlelink}</strong>";
}
# RTL/LTR marker
- $articlelink .= $this->getLang()->getDirMark();
+ $articlelink .= $this->getLanguage()->getDirMark();
wfRunHooks( 'ChangesListInsertArticleLink',
array(&$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched) );
*/
public function insertTimestamp( &$s, $rc ) {
$s .= $this->message['semicolon-separator'] .
- $this->getLang()->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
+ $this->getLanguage()->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
}
/** Insert links to user page, user talk page and eventually a blocking link
if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
$s .= ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
} else {
- $s .= $this->getLang()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
+ $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
$s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
}
}
public function insertLogEntry( $rc ) {
$formatter = LogFormatter::newFromRow( $rc->mAttribs );
$formatter->setShowUserToolLinks( true );
- $mark = $this->getLang()->getDirMark();
+ $mark = $this->getLanguage()->getDirMark();
return $formatter->getActionText() . " $mark" . $formatter->getComment();
}
if( $count > 0 ) {
if( !isset( $cache[$count] ) ) {
$cache[$count] = wfMsgExt( 'number_of_watching_users_RCview',
- array('parsemag', 'escape' ), $this->getLang()->formatNum( $count ) );
+ array('parsemag', 'escape' ), $this->getLanguage()->formatNum( $count ) );
}
return $cache[$count];
} else {
# User tool links
$this->insertUserRelatedLinks( $s, $rc );
# LTR/RTL direction mark
- $s .= $this->getLang()->getDirMark();
+ $s .= $this->getLanguage()->getDirMark();
$s .= $this->insertComment( $rc );
}
# How many users watch this page
if( $rc->numberofWatchingusers > 0 ) {
$s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview',
- array( 'parsemag', 'escape' ), $this->getLang()->formatNum( $rc->numberofWatchingusers ) );
+ array( 'parsemag', 'escape' ), $this->getLanguage()->formatNum( $rc->numberofWatchingusers ) );
}
if( $this->watchlist ) {
$curIdEq = array( 'curid' => $rc->mAttribs['rc_cur_id'] );
# If it's a new day, add the headline and flush the cache
- $date = $this->getLang()->date( $rc->mAttribs['rc_timestamp'], true );
+ $date = $this->getLanguage()->date( $rc->mAttribs['rc_timestamp'], true );
$ret = '';
if( $date != $this->lastdate ) {
# Process current cache
$showdifflinks = false;
}
- $time = $this->getLang()->time( $rc->mAttribs['rc_timestamp'], true, true );
+ $time = $this->getLanguage()->time( $rc->mAttribs['rc_timestamp'], true, true );
$rc->watched = $watched;
$rc->link = $clink;
$rc->timestamp = $time;
$users = array();
foreach( $userlinks as $userlink => $count) {
$text = $userlink;
- $text .= $this->getLang()->getDirMark();
+ $text .= $this->getLanguage()->getDirMark();
if( $count > 1 ) {
- $text .= ' (' . $this->getLang()->formatNum( $count ) . '×)';
+ $text .= ' (' . $this->getLanguage()->formatNum( $count ) . '×)';
}
array_push( $users, $text );
}
$this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
}
- $r .= $this->getLang()->getDirMark();
+ $r .= $this->getLanguage()->getDirMark();
$queryParams['curid'] = $curId;
# Changes message
$n = count($block);
static $nchanges = array();
if ( !isset( $nchanges[$n] ) ) {
- $nchanges[$n] = wfMsgExt( 'nchanges', array( 'parsemag', 'escape' ), $this->getLang()->formatNum( $n ) );
+ $nchanges[$n] = wfMsgExt( 'nchanges', array( 'parsemag', 'escape' ), $this->getLanguage()->formatNum( $n ) );
}
# Total change link
$r .= ' ';
* @return Message: $this
*/
public function setContext( IContextSource $context ) {
- $this->inLanguage( $context->getLang() );
+ $this->inLanguage( $context->getLanguage() );
$this->title( $context->getTitle() );
return $this;
? 'lag-warn-normal'
: 'lag-warn-high';
$wrap = Html::rawElement( 'div', array( 'class' => "mw-{$message}" ), "\n$1\n" );
- $this->wrapWikiMsg( "$wrap\n", array( $message, $this->getLang()->formatNum( $lag ) ) );
+ $this->wrapWikiMsg( "$wrap\n", array( $message, $this->getLanguage()->formatNum( $lag ) ) );
}
}
*/
public function headElement( Skin $sk, $includeStyle = true ) {
global $wgContLang, $wgUseTrackbacks;
- $userdir = $this->getLang()->getDir();
+ $userdir = $this->getLanguage()->getDir();
$sitedir = $wgContLang->getDir();
if ( $sk->commonPrintStylesheet() ) {
$this->addModuleStyles( 'mediawiki.legacy.wikiprintable' );
}
- $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
+ $ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
if ( $this->getHTMLTitle() == '' ) {
$this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) );
# Classes for LTR/RTL directionality support
$bodyAttrs['class'] = "mediawiki $userdir sitedir-$sitedir";
- if ( $this->getLang()->capitalizeAllNouns() ) {
+ if ( $this->getLanguage()->capitalizeAllNouns() ) {
# A <body> class is probably not the best way to do this . . .
$bodyAttrs['class'] .= ' capitalize-all-nouns';
}
// correct timestamp and emptiness data
$query = ResourceLoader::makeLoaderQuery(
array(), // modules; not determined yet
- $this->getLang()->getCode(),
+ $this->getLanguage()->getCode(),
$this->getSkin()->getSkinName(),
$user,
null, // version; not determined yet
$url = ResourceLoader::makeLoaderURL(
array_keys( $modules ),
- $this->getLang()->getCode(),
+ $this->getLanguage()->getCode(),
$this->getSkin()->getSkinName(),
$user,
$version,
* @param $flip String: Set to 'flip' to flip the CSS if needed
*/
public function addInlineStyle( $style_css, $flip = 'noflip' ) {
- if( $flip === 'flip' && $this->getLang()->isRTL() ) {
+ if( $flip === 'flip' && $this->getLanguage()->isRTL() ) {
# If wanted, and the interface is right-to-left, flip the CSS
$style_css = CSSJanus::transform( $style_css, true, false );
}
*/
protected function styleLink( $style, $options ) {
if( isset( $options['dir'] ) ) {
- if( $this->getLang()->getDir() != $options['dir'] ) {
+ if( $this->getLanguage()->getDir() != $options['dir'] ) {
return '';
}
}
}
foreach ( $this->mLimitsShown as $limit ) {
$links[] = $this->makeLink(
- $this->getLang()->formatNum( $limit ),
+ $this->getLanguage()->formatNum( $limit ),
array( 'offset' => $offset, 'limit' => $limit ),
'num'
);
return $this->mNavigationBar;
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$opts = array( 'parsemag', 'escapenoentities' );
$linkTexts = array(
return $this->mNavigationBar;
}
- $nicenumber = $this->getLang()->formatNum( $this->mLimit );
+ $nicenumber = $this->getLanguage()->formatNum( $this->mLimit );
$linkTexts = array(
'prev' => wfMsgExt(
'pager-newer-n',
$pagingLinks = $this->getPagingLinks( $linkTexts );
$limitLinks = $this->getLimitLinks();
- $limits = $this->getLang()->pipeList( $limitLinks );
+ $limits = $this->getLanguage()->pipeList( $limitLinks );
$this->mNavigationBar = "({$pagingLinks['first']}" .
wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
'next' => 'arrow_disabled_right_25.png',
'last' => 'arrow_disabled_last_25.png',
);
- if( $this->getLang()->isRTL() ) {
+ if( $this->getLanguage()->isRTL() ) {
$keys = array_keys( $labels );
$images = array_combine( $keys, array_reverse( $images ) );
$disabledImages = array_combine( $keys, array_reverse( $disabledImages ) );
# will be a string.
if( is_int( $value ) ){
$limit = $value;
- $text = $this->getLang()->formatNum( $limit );
+ $text = $this->getLanguage()->formatNum( $limit );
} else {
$limit = $key;
$text = $value;
asort( $userGroups );
asort( $userMembers );
- $lang = $context->getLang();
+ $lang = $context->getLanguage();
$defaultPreferences['usergroups'] = array(
'type' => 'info',
$defaultPreferences['commoncssjs'] = array(
'type' => 'info',
'raw' => true,
- 'default' => $context->getLang()->pipeList( $linkTools ),
+ 'default' => $context->getLanguage()->pipeList( $linkTools ),
'label-message' => 'prefs-common-css-js',
'section' => 'rendering/skin',
);
$selectedSkin = $user->getOption( 'skin' );
if ( in_array( $selectedSkin, array( 'cologneblue', 'standard' ) ) ) {
- $settings = array_flip( $context->getLang()->getQuickbarSettings() );
+ $settings = array_flip( $context->getLanguage()->getQuickbarSettings() );
$defaultPreferences['quickbar'] = array(
'type' => 'radio',
// Info
$now = wfTimestampNow();
- $lang = $context->getLang();
+ $lang = $context->getLanguage();
$nowlocal = Xml::element( 'span', array( 'id' => 'wpLocalTime' ),
$lang->time( $now, true ) );
$nowserver = $lang->time( $now, false ) .
$linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
}
- $display = $sn . ' ' . $context->msg( 'parentheses', $context->getLang()->pipeList( $linkTools ) )->text();
+ $display = $sn . ' ' . $context->msg( 'parentheses', $context->getLanguage()->pipeList( $linkTools ) )->text();
$ret[$display] = $skinkey;
}
* @return array
*/
static function getDateOptions( IContextSource $context ) {
- $dateopts = $context->getLang()->getDatePreferences();
+ $dateopts = $context->getLanguage()->getDatePreferences();
$ret = array();
if ( $key == 'default' ) {
$formatted = $context->msg( 'datedefault' )->escaped();
} else {
- $formatted = htmlspecialchars( $context->getLang()->timeanddate( $epoch, false, $key ) );
+ $formatted = htmlspecialchars( $context->getLanguage()->timeanddate( $epoch, false, $key ) );
}
$ret[$formatted] = $key;
}
$ts = $this->getCachedTimestamp();
if ( $ts ) {
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$updated = $lang->timeanddate( $ts, true, true );
$updateddate = $lang->date( $ts, true, true );
$updatedtime = $lang->time( $ts, true, true );
$out->addHTML( $this->msg( 'showingresults' )->numParams(
$this->numRows, $this->offset + 1 )->parseAsBlock() );
# Disable the "next" link when we reach the end
- $paging = $this->getLang()->viewPrevNext( $this->getTitle( $par ), $this->offset,
+ $paging = $this->getLanguage()->viewPrevNext( $this->getTitle( $par ), $this->offset,
$this->limit, $this->linkParameters(), ( $this->numRows < $this->limit ) );
$out->addHTML( '<p>' . $paging . '</p>' );
} else {
array( 'broken' )
);
}
- return $this->getLang()->specialList( $pageLink, $this->makeWlhLink( $title, $result ) );
+ return $this->getLanguage()->specialList( $pageLink, $this->makeWlhLink( $title, $result ) );
} else {
return $this->msg( 'wantedpages-badtitle', $result->title )->escaped();
}
/**
* List for revision table items for a single page
*/
-abstract class RevisionListBase {
+abstract class RevisionListBase extends ContextSource {
/**
* @var Title
*/
var $title;
- /**
- * @var IContextSource
- */
- var $context;
var $ids, $res, $current;
* @param $title Title
*/
function __construct( IContextSource $context, Title $title ) {
- $this->context = $context;
+ $this->setContext( $context );
$this->title = $title;
}
* @param $row stdclass
*/
abstract public function newItem( $row );
-
- /**
- * Get the language of the user doing the action
- *
- * @return Language object
- */
- public function getLang() {
- return $this->context->getLang();
- }
-
- /**
- * Get the user doing the action
- *
- * @return User object
- */
- public function getUser() {
- return $this->context->getUser();
- }
}
/**
* Get the date, formatted in user's languae
*/
public function formatDate() {
- return $this->list->context->getLang()->userDate( $this->getTimestamp(),
- $this->list->context->getUser() );
+ return $this->list->getLanguage()->userDate( $this->getTimestamp(),
+ $this->list->getUser() );
}
/**
* Get the time, formatted in user's languae
*/
public function formatTime() {
- return $this->list->context->getLang()->userTime( $this->getTimestamp(),
- $this->list->context->getUser() );
+ return $this->list->getLanguage()->userTime( $this->getTimestamp(),
+ $this->list->getUser() );
}
/**
* Overridden by RevDel_ArchiveItem.
*/
protected function getRevisionLink() {
- $date = $this->list->getLang()->timeanddate( $this->revision->getTimestamp(), true );
+ $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $date;
}
$msgObj = $this->msg( $msg )->rawParams( $link );
if ( $forContent ) {
$msg = $msgObj->inContentLanguage()->text();
- if ( $this->getLang()->getCode() !== $wgContLang->getCode() ) {
+ if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) {
$msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $msg );
}
return $msg;
}
if ( $timestamp ) {
- $d = $this->getLang()->userDate( $timestamp, $this->getUser() );
- $t = $this->getLang()->userTime( $timestamp, $this->getUser() );
+ $d = $this->getLanguage()->userDate( $timestamp, $this->getUser() );
+ $t = $this->getLanguage()->userTime( $timestamp, $this->getUser() );
$s = ' ' . $this->msg( 'lastmodifiedat', $d, $t )->text();
} else {
$s = '';
global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
wfProfileIn( __METHOD__ );
- $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
+ $key = wfMemcKey( 'sidebar', $this->getLanguage()->getCode() );
if ( $wgEnableSidebarCache ) {
$cachedsidebar = $parserMemc->get( $key );
$contentlang = $wgContLang->getCode();
$contentdir = $wgContLang->getDir();
- $userlang = $this->getLang()->getCode();
- $userdir = $this->getLang()->getDir();
+ $userlang = $this->getLanguage()->getCode();
+ $userdir = $this->getLanguage()->getDir();
$tpl->set( 'lang', $userlang );
$tpl->set( 'dir', $userdir );
- $tpl->set( 'rtl', $this->getLang()->isRTL() );
+ $tpl->set( 'rtl', $this->getLanguage()->isRTL() );
- $tpl->set( 'capitalizeallnouns', $this->getLang()->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' );
+ $tpl->set( 'capitalizeallnouns', $this->getLanguage()->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' );
$tpl->set( 'showjumplinks', $user->getOption( 'showjumplinks' ) );
$tpl->set( 'username', $user->isAnon() ? null : $this->username );
$tpl->set( 'userdisplayname', $user->isAnon() ? null : $this->userdisplayname );
* page list.
* @ingroup SpecialPage
*/
-class SpecialPage {
+class SpecialPage extends ContextSource {
// The canonical name of this special page
// Also used for the default <h1> heading, @see getDescription()
return self::getTitleFor( $this->mName, $subpage );
}
- /**
- * Sets the context this SpecialPage is executed in
- *
- * @param $context IContextSource
- * @since 1.18
- */
- public function setContext( $context ) {
- $this->mContext = $context;
- }
-
- /**
- * Gets the context this SpecialPage is executed in
- *
- * @return IContextSource
- * @since 1.18
- */
- public function getContext() {
- if ( $this->mContext instanceof IContextSource ) {
- return $this->mContext;
- } else {
- wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" );
- return RequestContext::getMain();
- }
- }
-
- /**
- * Get the WebRequest being used for this instance
- *
- * @return WebRequest
- * @since 1.18
- */
- public function getRequest() {
- return $this->getContext()->getRequest();
- }
-
- /**
- * Get the OutputPage being used for this instance
- *
- * @return OutputPage
- * @since 1.18
- */
- public function getOutput() {
- return $this->getContext()->getOutput();
- }
-
- /**
- * Shortcut to get the User executing this instance
- *
- * @return User
- * @since 1.18
- */
- public function getUser() {
- return $this->getContext()->getUser();
- }
-
- /**
- * Shortcut to get the skin being used for this instance
- *
- * @return Skin
- * @since 1.18
- */
- public function getSkin() {
- return $this->getContext()->getSkin();
- }
-
- /**
- * Shortcut to get user's language
- *
- * @return Language
- * @since 1.18
- */
- public function getLang() {
- return $this->getContext()->getLang();
- }
-
/**
* Return the full title, including $par
*
$wgOut = $context->getOutput();
$wgRequest = $context->getRequest();
$wgUser = $context->getUser();
- $wgLang = $context->getLang();
+ $wgLang = $context->getLanguage();
// The useful part
$ret = self::executePath( $title, $context, true );
* @return Language
*/
function _newObject() {
- return RequestContext::getMain()->getLang();
+ return RequestContext::getMain()->getLanguage();
}
}
$timestamp = $article->getTimestamp();
if ( $timestamp ) {
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$d = $lang->date( $article->getTimestamp(), true );
$t = $lang->time( $article->getTimestamp(), true );
} else {
}
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
if ( count( $real_names ) ) {
$real = $lang->listToText( $real_names );
$s .= " $del ";
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$dirmark = $lang->getDirMark();
$s .= " $link";
* @return String
*/
function revLink( $rev ) {
- $date = $this->getLang()->userTimeAndDate( $rev->getTimestamp(), $this->getUser() );
+ $date = $this->getLanguage()->userTimeAndDate( $rev->getTimestamp(), $this->getUser() );
$date = htmlspecialchars( $date );
if ( $rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
$link = Linker::linkKnown(
) .
Html::rawElement( 'tr', array(),
Html::element( 'td', array(), wfMsg( 'pageinfo-edits' ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $pageInfo['edits'] ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $talkInfo['edits'] ) )
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $pageInfo['edits'] ) ) .
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $talkInfo['edits'] ) )
) .
Html::rawElement( 'tr', array(),
Html::element( 'td', array(), wfMsg( 'pageinfo-authors' ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $pageInfo['authors'] ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $talkInfo['authors'] ) )
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $pageInfo['authors'] ) ) .
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $talkInfo['authors'] ) )
) .
( !$this->getUser()->isAllowed( 'unwatchedpages' ) ? '' :
Html::rawElement( 'tr', array(),
) .
Html::rawElement( 'tr', array(),
Html::element( 'td', array(), wfMsg( 'pageinfo-watchers' ) ) .
- Html::element( 'td', array( 'colspan' => 2 ), $this->getLang()->formatNum( $pageInfo['watchers'] ) )
+ Html::element( 'td', array( 'colspan' => 2 ), $this->getLanguage()->formatNum( $pageInfo['watchers'] ) )
)
).
( $wgDisableCounters ? '' :
) .
Html::rawElement( 'tr', array(),
Html::element( 'td', array(), wfMsg( 'pageinfo-views' ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $pageInfo['views'] ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( $talkInfo['views'] ) )
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $pageInfo['views'] ) ) .
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( $talkInfo['views'] ) )
) .
Html::rawElement( 'tr', array(),
Html::element( 'td', array(), wfMsg( 'pageinfo-viewsperedit' ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( sprintf( '%.2f', $pageInfo['edits'] ? $pageInfo['views'] / $pageInfo['edits'] : 0 ) ) ) .
- Html::element( 'td', array(), $this->getLang()->formatNum( sprintf( '%.2f', $talkInfo['edits'] ? $talkInfo['views'] / $talkInfo['edits'] : 0 ) ) )
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( sprintf( '%.2f', $pageInfo['edits'] ? $pageInfo['views'] / $pageInfo['edits'] : 0 ) ) ) .
+ Html::element( 'td', array(), $this->getLanguage()->formatNum( sprintf( '%.2f', $talkInfo['edits'] ? $talkInfo['views'] / $talkInfo['edits'] : 0 ) ) )
)
)
);
'vertical-label' => true,
'raw' => true,
'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(),
- $this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ),
+ $this->getLanguage()->date( $timestamp, true ), $this->getLanguage()->time( $timestamp, true ),
wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
PROTO_CURRENT
) )
public function onSuccess() {
$timestamp = $this->oldFile->getTimestamp();
$this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(),
- $this->getLang()->date( $timestamp, true ),
- $this->getLang()->time( $timestamp, true ),
+ $this->getLanguage()->date( $timestamp, true ),
+ $this->getLanguage()->time( $timestamp, true ),
wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
PROTO_CURRENT
) ) );
$user = $context->getUser();
// Check for non-standard user language; this covers uselang,
// and extensions for auto-detecting user language.
- $ulang = $context->getLang()->getCode();
+ $ulang = $context->getLanguage()->getCode();
$clang = $wgContLang->getCode();
// Check that there are no other sources of variation
return !$wgShowIPinHeader && !$user->getId() && !$user->getNewtalk() && $ulang == $clang;
/**
* Get the Language object
*
+ * @deprecated 1.19 Use getLanguage instead
* @return Language
*/
public function getLang() {
- return $this->getContext()->getLang();
+ return $this->getLanguage();
+ }
+
+ /**
+ * Get the Language object
+ *
+ * @return Language
+ */
+ public function getLanguage() {
+ return $this->getContext()->getLanguage();
}
/**
}
}
+ /**
+ * @deprecated 1.19 Use getLanguage instead
+ * @return Language
+ */
+ public function getLang() {
+ $this->getLanguage();
+ }
+
/**
* Get the Language object
*
* @return Language
*/
- public function getLang() {
+ public function getLanguage() {
if ( !is_null( $this->lang ) ) {
return $this->lang;
} else {
- return $this->getContext()->getLang();
+ return $this->getContext()->getLanguage();
}
}
/**
* Get the Language object
*
+ * @deprecated 1.19 Use getLanguage instead
* @return Language
*/
public function getLang();
+ /**
+ * Get the Language object
+ *
+ * @return Language
+ */
+ public function getLanguage();
+
/**
* Get the Skin object
*
}
}
+ /**
+ * @deprecated 1.19 Use getLanguage instead
+ * @return Language
+ */
+ public function getLang() {
+ return $this->getLanguage();
+ }
+
/**
* Get the Language object
*
* @return Language
*/
- public function getLang() {
+ public function getLanguage() {
if ( $this->lang === null ) {
global $wgLanguageCode, $wgContLang;
$code = $this->getRequest()->getVal(
* @return String HTML fragment
*/
private function getRevisionHeader( Revision $rev, $complete = '' ) {
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$user = $this->getUser();
$revtimestamp = $rev->getTimestamp();
$timestamp = $lang->userTimeAndDate( $revtimestamp, $user );
*/
protected function msg( $key ) {
return wfMessage( $key )
- ->inLanguage( $this->context->getLang() )
+ ->inLanguage( $this->context->getLanguage() )
->title( $this->context->getTitle() );
}
foreach ( $extra as $v ) {
$changes[] = $this->msg( $v )->plain();
}
- $changeText = $this->context->getLang()->listToText( $changes );
+ $changeText = $this->context->getLanguage()->listToText( $changes );
$newParams = array_slice( $params, 0, 3 );
$newParams[3] = $changeText;
$count = count( explode( ',', $params[$paramStart] ) );
- $newParams[4] = $this->context->getLang()->formatNum( $count );
+ $newParams[4] = $this->context->getLanguage()->formatNum( $count );
return $this->parsedParametersDeleteLog = $newParams;
} else {
return $this->parsedParametersDeleteLog = array_slice( $params, 0, 3 );
$target = $this->entry->getTarget();
$oldid = $params[3];
- $revision = $this->context->getLang()->formatNum( $oldid, true );
+ $revision = $this->context->getLanguage()->formatNum( $oldid, true );
if ( $this->plaintext ) {
$revlink = $revision;
* @return ParserOptions object
*/
public static function newFromContext( IContextSource $context ) {
- return new ParserOptions( $context->getUser(), $context->getLang() );
+ return new ParserOptions( $context->getUser(), $context->getLanguage() );
}
/** Get user options */
* Overridden by RevDel_ArchiveItem.
*/
protected function getRevisionLink() {
- $date = $this->list->getLang()->timeanddate( $this->revision->getTimestamp(), true );
+ $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $date;
}
protected function getRevisionLink() {
$undelete = SpecialPage::getTitleFor( 'Undelete' );
- $date = $this->list->getLang()->timeanddate( $this->revision->getTimestamp(), true );
+ $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $date;
}
* Overridden by RevDel_ArchivedFileItem.
*/
protected function getLink() {
- $date = $this->list->getLang()->timeanddate( $this->file->getTimestamp(), true );
+ $date = $this->list->getLanguage()->timeanddate( $this->file->getTimestamp(), true );
if ( $this->isDeleted() ) {
# Hidden files...
if ( !$this->canViewContent() ) {
$data =
wfMsg(
'widthheight',
- $this->list->getLang()->formatNum( $this->file->getWidth() ),
- $this->list->getLang()->formatNum( $this->file->getHeight() )
+ $this->list->getLanguage()->formatNum( $this->file->getWidth() ),
+ $this->list->getLanguage()->formatNum( $this->file->getHeight() )
) .
' (' .
- wfMsgExt( 'nbytes', 'parsemag', $this->list->getLang()->formatNum( $this->file->getSize() ) ) .
+ wfMsgExt( 'nbytes', 'parsemag', $this->list->getLanguage()->formatNum( $this->file->getSize() ) ) .
')';
return '<li>' . $this->getLink() . ' ' . $this->getUserTools() . ' ' .
}
protected function getLink() {
- $date = $this->list->getLang()->timeanddate( $this->file->getTimestamp(), true );
+ $date = $this->list->getLanguage()->timeanddate( $this->file->getTimestamp(), true );
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$key = $this->file->getKey();
# Hidden files...
}
public function getHTML() {
- $date = htmlspecialchars( $this->list->getLang()->timeanddate( $this->row->log_timestamp ) );
+ $date = htmlspecialchars( $this->list->getLanguage()->timeanddate( $this->row->log_timestamp ) );
$paramArray = LogPage::extractParams( $this->row->log_params );
$title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
$userLink = '<span class="history-deleted">' . $userLink . '</span>';
}
// Comment
- $comment = $this->list->getLang()->getDirMark() . Linker::commentBlock( $this->row->log_comment );
+ $comment = $this->list->getLanguage()->getDirMark() . Linker::commentBlock( $this->row->log_comment );
if( LogEventsList::isDeleted($this->row,LogPage::DELETED_COMMENT) ) {
$comment = '<span class="history-deleted">' . $comment . '</span>';
}
$ulinks = Linker::userLink( $row->user_id, $userName );
$ulinks .= Linker::userToolLinks( $row->user_id, $userName );
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$list = array();
foreach( self::getGroups( $row->user_id ) as $group ) {
$out = $this->getOutput();
$out->wrapWikiMsg( "<div class='mw-activeusers-intro'>\n$1\n</div>",
- array( 'activeusers-intro', $this->getLang()->formatNum( $wgActiveUserDays ) ) );
+ array( 'activeusers-intro', $this->getLanguage()->formatNum( $wgActiveUserDays ) ) );
$up = new ActiveUsersPager( $this->getContext() );
$this->custom = ($request->getVal( 'filter' ) == 'unmodified');
}
- $prefix = $this->getLang()->ucfirst( $request->getVal( 'prefix', '' ) );
+ $prefix = $this->getLanguage()->ucfirst( $request->getVal( 'prefix', '' ) );
$prefix = $prefix != '' ? Title::makeTitleSafe( NS_MEDIAWIKI, $request->getVal( 'prefix', null ) ) : null;
if( $prefix !== null ){
$this->displayPrefix = $prefix->getDBkey();
$talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
if( $this->mCurrentRow->am_customised ){
- $title = Linker::linkKnown( $title, $this->getLang()->lcfirst( $value ) );
+ $title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) );
} else {
$title = Linker::link(
$title,
- $this->getLang()->lcfirst( $value ),
+ $this->getLanguage()->lcfirst( $value ),
array(),
array(),
array( 'broken' )
$arr['class'] = 'allmessages-customised';
}
if( !$isSecond ){
- $arr['id'] = Sanitizer::escapeId( 'msg_' . $this->getLang()->lcfirst( $row->am_title ) );
+ $arr['id'] = Sanitizer::escapeId( 'msg_' . $this->getLanguage()->lcfirst( $row->am_title ) );
}
return $arr;
}
array(),
$query
);
- $out2 = $this->getLang()->pipeList( array( $out2, $prevLink ) );
+ $out2 = $this->getLanguage()->pipeList( array( $out2, $prevLink ) );
}
if( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
array(),
$query
);
- $out2 = $this->getLang()->pipeList( array( $out2, $nextLink ) );
+ $out2 = $this->getLanguage()->pipeList( array( $out2, $nextLink ) );
}
$out2 .= "</td></tr></table>";
}
$output->addHTML(
Html::element( 'hr' ) .
Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ),
- $this->getLang()->pipeList( $links )
+ $this->getLanguage()->pipeList( $links )
) );
}
function formatResult( $skin, $result ) {
global $wgContLang;
- $d = $this->getLang()->userTimeAndDate( $result->value, $this->getUser() );
+ $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() );
$title = Title::makeTitle( $result->namespace, $result->title );
$link = Linker::linkKnown(
$title,
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
- return $this->getLang()->specialList( $link, htmlspecialchars( $d ) );
+ return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
}
}
$text = Html::rawElement(
'p',
array( 'class' => 'mw-ipb-conveniencelinks' ),
- $this->getLang()->pipeList( $links )
+ $this->getLanguage()->pipeList( $links )
);
if( $this->target instanceof User ){
switch( $name ) {
case 'ipb_timestamp':
- $formatted = $this->getLang()->timeanddate( $value, /* User preference timezone */ true );
+ $formatted = $this->getLanguage()->timeanddate( $value, /* User preference timezone */ true );
break;
case 'ipb_target':
break;
case 'ipb_expiry':
- $formatted = $this->getLang()->formatExpiry( $value, /* User preference timezone */ true );
+ $formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */ true );
if( $this->getUser()->isAllowed( 'block' ) ){
if( $row->ipb_auto ){
$links[] = Linker::linkKnown(
$formatted .= ' ' . Html::rawElement(
'span',
array( 'class' => 'mw-blocklist-actions' ),
- wfMsg( 'parentheses', $this->getLang()->pipeList( $links ) )
+ wfMsg( 'parentheses', $this->getLanguage()->pipeList( $links ) )
);
}
break;
$properties[] = $msg['blocklist-nousertalk'];
}
- $formatted = $this->getLang()->commaList( $properties );
+ $formatted = $this->getLanguage()->commaList( $properties );
break;
default:
array(),
array( 'broken' )
);
- $arr = $this->getLang()->getArrow();
+ $arr = $this->getLanguage()->getArrow();
$out = $from . $this->msg( 'word-separator' )->escaped();
);
}
- $out .= $this->msg( 'parentheses' )->rawParams( $this->getLang()->pipeList( $links ) )->escaped();
+ $out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()->pipeList( $links ) )->escaped();
$out .= " {$arr} {$to}";
return $out;
}
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
$titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
$count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped();
- return Xml::tags( 'li', null, $this->getLang()->specialList( $titleText, $count ) ) . "\n";
+ return Xml::tags( 'li', null, $this->getLanguage()->specialList( $titleText, $count ) ) . "\n";
}
public function getStartForm( $from ) {
'<td></td>' .
'<td class="mw-input">' .
Xml::checkLabel(
- wfMsgExt( 'remembermypassword', 'parsemag', $this->getLang()->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ),
+ wfMsgExt( 'remembermypassword', 'parsemag', $this->getLanguage()->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ),
'wpRemember', 'wpRemember',
$this->getRequest()->getCheck( 'wpRemember' ) ) .
'</td>' .
// date and time are separate parameters to facilitate localisation.
// $time is kept for backward compat reasons.
// 'emailauthenticated' is also used in SpecialPreferences.php
- $time = $this->getLang()->timeAndDate( $user->mEmailAuthenticated, true );
- $d = $this->getLang()->date( $user->mEmailAuthenticated, true );
- $t = $this->getLang()->time( $user->mEmailAuthenticated, true );
+ $time = $this->getLanguage()->timeAndDate( $user->mEmailAuthenticated, true );
+ $d = $this->getLanguage()->date( $user->mEmailAuthenticated, true );
+ $t = $this->getLanguage()->time( $user->mEmailAuthenticated, true );
$out->addWikiMsg( 'emailauthenticated', $time, $d, $t );
}
if( $user->isEmailConfirmationPending() ) {
$talk = $userObj->getTalkPage();
if( $talk ) {
$tools = self::getUserLinks( $nt, $talk, $userObj, $this->getUser() );
- $links = $this->getLang()->pipeList( $tools );
+ $links = $this->getLanguage()->pipeList( $tools );
// Show a note if the user is blocked and display the last block log entry.
if ( $userObj->isBlocked() ) {
$chardiff = ' ';
}
- $comment = $this->getLang()->getDirMark() . Linker::revComment( $rev, false, true );
- $date = $this->getLang()->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
+ $comment = $this->getLanguage()->getDirMark() . Linker::revComment( $rev, false, true );
+ $date = $this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
if( $rev->userCan( Revision::DELETED_TEXT, $user ) ) {
$d = Linker::linkKnown(
$page,
if ( isset( $this->mNavigationBar ) ) {
return $this->mNavigationBar;
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$fmtLimit = $lang->formatNum( $this->mLimit );
$linkTexts = array(
'prev' => wfMsgExt( 'pager-newer-n', array( 'escape', 'parsemag' ), $fmtLimit ),
}
$comment = Linker::revComment( $rev );
- $date = htmlspecialchars( $this->getLang()->timeanddate( $rev->getTimestamp(), true ) );
+ $date = htmlspecialchars( $this->getLanguage()->timeanddate( $rev->getTimestamp(), true ) );
if( !$user->isAllowed( 'undelete' ) || !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
$link = $date; // unusable link
$tools = Html::rawElement(
'span',
array( 'class' => 'mw-deletedcontribs-tools' ),
- wfMsg( 'parentheses', $this->getLang()->pipeList( array( $last, $dellog, $reviewlink ) ) )
+ wfMsg( 'parentheses', $this->getLanguage()->pipeList( array( $last, $dellog, $reviewlink ) ) )
);
$ret = "{$del}{$link} {$tools} . . {$mflag} {$pagelink} {$comment}";
wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
- $links = $this->getLang()->pipeList( $tools );
+ $links = $this->getLanguage()->pipeList( $tools );
// Show a note if the user is blocked and display the last block log entry.
if ( $userObj->isBlocked() ) {
$from = Linker::link( $title );
$edit = Linker::link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) ,
array(), array( 'redirect' => 'no', 'action' => 'edit' ) );
- $arr = $this->getLang()->getArrow();
+ $arr = $this->getLanguage()->getArrow();
$to = Linker::link( $dp );
return "$from $edit $arr $to";
$linkC = Linker::linkKnown( $titleC );
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
if( count( $toWatch ) > 0 ) {
$this->successMessage .= ' ' . wfMessage(
'watchlistedit-raw-added',
- $this->getLang()->formatNum( count( $toWatch ) )
+ $this->getLanguage()->formatNum( count( $toWatch ) )
);
$this->showTitles( $toWatch, $this->successMessage );
}
if( count( $toUnwatch ) > 0 ) {
$this->successMessage .= ' ' . wfMessage(
'watchlistedit-raw-removed',
- $this->getLang()->formatNum( count( $toUnwatch ) )
+ $this->getLanguage()->formatNum( count( $toUnwatch ) )
);
$this->showTitles( $toUnwatch, $this->successMessage );
}
$this->successMessage .= ' ' . wfMessage(
'watchlistedit-raw-removed',
- $this->getLang()->formatNum( count( $current ) )
+ $this->getLanguage()->formatNum( count( $current ) )
);
$this->showTitles( $current, $this->successMessage );
}
if( count( $removed ) > 0 ) {
$this->successMessage = wfMessage(
'watchlistedit-normal-done',
- $this->getLang()->formatNum( count( $removed ) )
+ $this->getLanguage()->formatNum( count( $removed ) )
);
$this->showTitles( $removed, $this->successMessage );
return true;
? wfMsgHtml( 'blanknamespace' )
: htmlspecialchars( $wgContLang->getFormattedNsText( $ns ) );
$this->toc .= Linker::tocLine( "mw-htmlform-{$data['section']}", $nsText,
- $this->getLang()->formatNum( ++$tocLength ), 1 ) . Linker::tocLineEnd();
+ $this->getLanguage()->formatNum( ++$tocLength ), 1 ) . Linker::tocLineEnd();
}
$this->toc = Linker::tocList( $this->toc );
} else {
wfRunHooks( 'WatchlistEditorBuildRemoveLine', array( &$tools, $title, $title->isRedirect(), $this->getSkin() ) );
- return $link . " (" . $this->getLang()->pipeList( $tools ) . ")";
+ return $link . " (" . $this->getLanguage()->pipeList( $tools ) . ")";
}
/**
$namespace = substr( $namespace, 2 );
return $namespace == NS_MAIN
? wfMsgHtml( 'blanknamespace' )
- : htmlspecialchars( $this->getContext()->getLang()->getFormattedNsText( $namespace ) );
+ : htmlspecialchars( $this->getContext()->getLanguage()->getFormattedNsText( $namespace ) );
}
}
array( 'action' => 'history' )
) . $redirect;
- return $this->getLang()->specialList( $plink, $nlink );
+ return $this->getLanguage()->specialList( $plink, $nlink );
}
}
$out->addHTML( '<div id="mw-fileduplicatesearch-icon">' .
$thumb->toHtml( array( 'desc-link' => false ) ) . '<br />' .
wfMsgExt( 'fileduplicatesearch-info', array( 'parse' ),
- $this->getLang()->formatNum( $img->getWidth() ),
- $this->getLang()->formatNum( $img->getHeight() ),
- $this->getLang()->formatSize( $img->getSize() ),
+ $this->getLanguage()->formatNum( $img->getWidth() ),
+ $this->getLanguage()->formatNum( $img->getHeight() ),
+ $this->getLanguage()->formatSize( $img->getSize() ),
$img->getMimeType()
) .
'</div>' );
$out->wrapWikiMsg(
"<p class='mw-fileduplicatesearch-result-n'>\n$1\n</p>",
array( 'fileduplicatesearch-result-n', wfEscapeWikiText( $this->filename ),
- $this->getLang()->formatNum( $numRows - 1 ) )
+ $this->getLanguage()->formatNum( $numRows - 1 ) )
);
}
$userText = $result->getUser( 'text' );
$user = Linker::link( Title::makeTitle( NS_USER, $userText ), $userText );
- $time = $this->getLang()->timeanddate( $result->getTimestamp() );
+ $time = $this->getLanguage()->timeanddate( $result->getTimestamp() );
return "$plink . . $user . . $time";
}
$this->mPageCount++;
- $localCount = $this->getLang()->formatNum( $successCount );
+ $localCount = $this->getLanguage()->formatNum( $successCount );
$contentCount = $wgContLang->formatNum( $successCount );
if( $successCount > 0 ) {
$out = $this->getOutput();
if ( $this->mLogItemCount > 0 ) {
$msg = wfMsgExt( 'imported-log-entries', 'parseinline',
- $this->getLang()->formatNum( $this->mLogItemCount ) );
+ $this->getLanguage()->formatNum( $this->mLogItemCount ) );
$out->addHTML( Xml::tags( 'li', null, $msg ) );
} elseif( $this->mPageCount == 0 && $this->mLogItemCount == 0 ) {
$out->addHTML( "</ul>\n" );
$protocol = '';
}
- $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLang()->commaList( $wgUrlProtocols ) . '</nowiki>' );
+ $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLanguage()->commaList( $wgUrlProtocols ) . '</nowiki>' );
$s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
'<fieldset>' .
$thumb = $file->transform( array( 'width' => 180, 'height' => 360 ) );
return $thumb->toHtml( array( 'desc-link' => true ) );
case 'img_timestamp':
- return htmlspecialchars( $this->getLang()->timeanddate( $value, true ) );
+ return htmlspecialchars( $this->getLanguage()->timeanddate( $value, true ) );
case 'img_name':
static $imgfile = null;
if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' );
}
return $link;
case 'img_size':
- return htmlspecialchars( $this->getLang()->formatSize( $value ) );
+ return htmlspecialchars( $this->getLanguage()->formatSize( $value ) );
case 'img_description':
return Linker::commentBlock( $value );
case 'count':
}
}
sort( $r );
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
if( $add === true ){
$r[] = wfMsgExt( 'listgrouprights-addgroup-all', array( 'escape' ) );
} elseif( is_array( $add ) && count( $add ) ) {
$target = $this->getRedirectTarget( $result );
if( $target ) {
# Make a link to the destination page
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
$targetLink = Linker::link( $target );
return "$rd_link $arr $targetLink";
$userPage = Title::makeTitle( NS_USER, $row->user_name );
$name = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) );
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$groups_list = self::getGroups( $row->user_id );
if( count( $groups_list ) > 0 ) {
);
$download = Linker::makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) );
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
$lang->formatNum( $result->img_size ) );
$dimensions = htmlspecialchars( wfMsg( 'widthheight',
$pageLink = Linker::linkKnown(
$rev->getTitle(),
- htmlspecialchars( $this->getLang()->timeanddate( $ts ) ),
+ htmlspecialchars( $this->getLanguage()->timeanddate( $ts ) ),
array(),
array( 'oldid' => $rev->getId() )
);
$count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
$link = Linker::link( $title );
- return $this->getLang()->specialList( $link, $count );
+ return $this->getLanguage()->specialList( $link, $count );
}
}
$link = Linker::link( $title );
$wlh = $this->makeWlhLink( $title,
$this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
- return $this->getLang()->specialList( $link, $wlh );
+ return $this->getLanguage()->specialList( $link, $wlh );
}
}
$plink = Linker::link( $nt, htmlspecialchars( $text ) );
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
- return $this->getLang()->specialList( $plink, $nlinks );
+ return $this->getLanguage()->specialList( $plink, $nlinks );
}
}
public function formatResult( $skin, $result ) {
$title = Title::makeTitle( $result->namespace, $result->title );
- return $this->getLang()->specialList(
+ return $this->getLanguage()->specialList(
Linker::link( $title ),
$this->makeWlhLink( $title, $result )
);
? 'move-subpages'
: 'move-talk-subpages' ),
array( 'parseinline' ),
- $this->getLang()->formatNum( $wgMaximumMovedPages ),
+ $this->getLanguage()->formatNum( $wgMaximumMovedPages ),
# $2 to allow use of PLURAL in message.
$wgMaximumMovedPages
)
# Disallow deletions of big articles
$bigHistory = $page->isBigDeletion();
if( $bigHistory && count( $nt->getUserPermissionsErrors( 'bigdelete', $user ) ) ) {
- $this->showForm( array( 'delete-toobig', $this->getLang()->formatNum( $wgDeleteRevisionsLimit ) ) );
+ $this->showForm( array( 'delete-toobig', $this->getLanguage()->formatNum( $wgDeleteRevisionsLimit ) ) );
return;
}
$extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink );
++$count;
if( $count >= $wgMaximumMovedPages ) {
- $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $this->getLang()->formatNum( $wgMaximumMovedPages ) );
+ $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $this->getLanguage()->formatNum( $wgMaximumMovedPages ) );
break;
}
} else {
return;
}
- $out->addWikiMsg( 'movesubpagetext', $this->getLang()->formatNum( $count ) );
+ $out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) );
$out->addHTML( "<ul>\n" );
foreach( $subpages as $subpage ) {
$this->gallery->add(
$title,
"$ul<br />\n<i>"
- . htmlspecialchars( $this->getLang()->timeanddate( $row->img_timestamp, true ) )
+ . htmlspecialchars( $this->getLanguage()->timeanddate( $row->img_timestamp, true ) )
. "</i><br />\n"
);
}
$this->opts->setValue( 'username', $m[1] );
}
if ( preg_match( '/^namespace=(.*)$/', $bit, $m ) ) {
- $ns = $this->getLang()->getNsIndex( $m[1] );
+ $ns = $this->getLanguage()->getNsIndex( $m[1] );
if( $ns !== false ) {
$this->opts->setValue( 'namespace', $ns );
}
$links[$key] = wfMsgHtml( $msg, $link );
}
- return $this->getLang()->pipeList( $links );
+ return $this->getLanguage()->pipeList( $links );
}
protected function form() {
$classes = array();
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$dm = $lang->getDirMark();
$title = Title::newFromRow( $result );
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
$nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
- return $this->getLang()->specialList( $link, $nv );
+ return $this->getLanguage()->specialList( $link, $nv );
}
}
}
$stxt = '';
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$expiry = $lang->formatExpiry( $row->pr_expiry, TS_MW );
if( $expiry != $infinity ) {
$description_items[] = $protType;
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$expiry = strlen( $row->pt_expiry ) ? $lang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity;
if( $expiry != $infinity ) {
$expiry_description = wfMsg(
}
if( $options['from'] ) {
$note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
- $this->getLang()->formatNum( $options['limit'] ),
- $this->getLang()->timeanddate( $options['from'], true ),
- $this->getLang()->date( $options['from'], true ),
- $this->getLang()->time( $options['from'], true ) ) . '<br />';
+ $this->getLanguage()->formatNum( $options['limit'] ),
+ $this->getLanguage()->timeanddate( $options['from'], true ),
+ $this->getLanguage()->date( $options['from'], true ),
+ $this->getLanguage()->time( $options['from'], true ) ) . '<br />';
}
# Sort data for display and make sure it's unique after we've added user data.
// limit links
foreach( $wgRCLinkLimits as $value ) {
- $cl[] = $this->makeOptionsLink( $this->getLang()->formatNum( $value ),
+ $cl[] = $this->makeOptionsLink( $this->getLanguage()->formatNum( $value ),
array( 'limit' => $value ), $nondefaults, $value == $options['limit'] );
}
- $cl = $this->getLang()->pipeList( $cl );
+ $cl = $this->getLanguage()->pipeList( $cl );
// day links, reset 'from' to none
foreach( $wgRCLinkDays as $value ) {
- $dl[] = $this->makeOptionsLink( $this->getLang()->formatNum( $value ),
+ $dl[] = $this->makeOptionsLink( $this->getLanguage()->formatNum( $value ),
array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] );
}
- $dl = $this->getLang()->pipeList( $dl );
+ $dl = $this->getLanguage()->pipeList( $dl );
// show/hide links
// show from this onward link
$timestamp = wfTimestampNow();
- $now = $this->getLang()->timeanddate( $timestamp, true );
+ $now = $this->getLanguage()->timeanddate( $timestamp, true );
$tl = $this->makeOptionsLink(
$now, array( 'from' => $timestamp ), $nondefaults
);
$rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
- $cl, $dl, $this->getLang()->pipeList( $links ) );
+ $cl, $dl, $this->getLanguage()->pipeList( $links ) );
$rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
return "{$note}$rclinks<br />$rclistfrom";
}
}
}
# Logs themselves don't have histories or archived revisions
- $this->getOutput()->addSubtitle( $this->getLang()->pipeList( $links ) );
+ $this->getOutput()->addSubtitle( $this->getLanguage()->pipeList( $links ) );
}
}
if ( !$this->getUser()->matchEditToken( $this->token, $archiveName ) ) {
$this->getOutput()->addWikiMsg( 'revdelete-show-file-confirm',
$this->targetObj->getText(),
- $this->getLang()->date( $oimage->getTimestamp() ),
- $this->getLang()->time( $oimage->getTimestamp() ) );
+ $this->getLanguage()->date( $oimage->getTimestamp() ),
+ $this->getLanguage()->time( $oimage->getTimestamp() ) );
$this->getOutput()->addHTML(
Xml::openElement( 'form', array(
'method' => 'POST',
$UserAllowed = true;
if ( $this->typeName == 'logging' ) {
- $this->getOutput()->addWikiMsg( 'logdelete-selected', $this->getLang()->formatNum( count($this->ids) ) );
+ $this->getOutput()->addWikiMsg( 'logdelete-selected', $this->getLanguage()->formatNum( count($this->ids) ) );
} else {
$this->getOutput()->addWikiMsg( 'revdelete-selected',
$this->targetObj->getPrefixedText(), count( $this->ids ) );
if( $num || $this->offset ) {
// Show the create link ahead
$this->showCreateLink( $t );
- $prevnext = $this->getLang()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
+ $prevnext = $this->getLanguage()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
$this->powerSearchOptions() + array( 'search' => $term ),
max( $titleMatchesNum, $textMatchesNum ) < $this->limit
);
// format text extract
$extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
// format score
if( is_null( $result->getScore() ) ) {
}
$profiles = $this->getSearchProfiles();
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
// Outputs XML for Search Types
$out .= Xml::openElement( 'div', array( 'class' => 'search-types' ) );
}
function formatResult( $skin, $result ) {
- $dm = $this->getLang()->getDirMark();
+ $dm = $this->getLanguage()->getDirMark();
$title = Title::makeTitle( $result->namespace, $result->title );
if ( !$title ) {
Xml::closeElement( 'tr' ) .
$this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Allpages' ),
wfMsgExt( 'statistics-articles', array( 'parseinline' ) ) ),
- $this->getLang()->formatNum( $this->good ),
+ $this->getLanguage()->formatNum( $this->good ),
array( 'class' => 'mw-statistics-articles' ) ) .
$this->formatRow( wfMsgExt( 'statistics-pages', array( 'parseinline' ) ),
- $this->getLang()->formatNum( $this->total ),
+ $this->getLanguage()->formatNum( $this->total ),
array( 'class' => 'mw-statistics-pages' ),
'statistics-pages-desc' ) .
$this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Listfiles' ),
wfMsgExt( 'statistics-files', array( 'parseinline' ) ) ),
- $this->getLang()->formatNum( $this->images ),
+ $this->getLanguage()->formatNum( $this->images ),
array( 'class' => 'mw-statistics-files' ) );
}
private function getEditStats() {
Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-edits', array( 'parseinline' ) ) ) .
Xml::closeElement( 'tr' ) .
$this->formatRow( wfMsgExt( 'statistics-edits', array( 'parseinline' ) ),
- $this->getLang()->formatNum( $this->edits ),
+ $this->getLanguage()->formatNum( $this->edits ),
array( 'class' => 'mw-statistics-edits' ) ) .
$this->formatRow( wfMsgExt( 'statistics-edits-average', array( 'parseinline' ) ),
- $this->getLang()->formatNum( sprintf( '%.2f', $this->total ? $this->edits / $this->total : 0 ) ),
+ $this->getLanguage()->formatNum( sprintf( '%.2f', $this->total ? $this->edits / $this->total : 0 ) ),
array( 'class' => 'mw-statistics-edits-average' ) );
}
Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-users', array( 'parseinline' ) ) ) .
Xml::closeElement( 'tr' ) .
$this->formatRow( wfMsgExt( 'statistics-users', array( 'parseinline' ) ),
- $this->getLang()->formatNum( $this->users ),
+ $this->getLanguage()->formatNum( $this->users ),
array( 'class' => 'mw-statistics-users' ) ) .
$this->formatRow( wfMsgExt( 'statistics-users-active', array( 'parseinline' ) ) . ' ' .
Linker::linkKnown(
SpecialPage::getTitleFor( 'Activeusers' ),
wfMsgHtml( 'listgrouprights-members' )
),
- $this->getLang()->formatNum( $this->activeUsers ),
+ $this->getLanguage()->formatNum( $this->activeUsers ),
array( 'class' => 'mw-statistics-users-active' ),
'statistics-users-active-desc',
- $this->getLang()->formatNum( $wgActiveUserDays ) );
+ $this->getLanguage()->formatNum( $wgActiveUserDays ) );
}
private function getGroupStats() {
$classZero = ' statistics-group-zero';
}
$text .= $this->formatRow( $grouppage . ' ' . $grouplink,
- $this->getLang()->formatNum( $countUsers ),
+ $this->getLanguage()->formatNum( $countUsers ),
array( 'class' => 'statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero ) );
}
return $text;
Xml::tags( 'th', array( 'colspan' => '2' ), wfMsgExt( 'statistics-header-views', array( 'parseinline' ) ) ) .
Xml::closeElement( 'tr' ) .
$this->formatRow( wfMsgExt( 'statistics-views-total', array( 'parseinline' ) ),
- $this->getLang()->formatNum( $this->views ),
+ $this->getLanguage()->formatNum( $this->views ),
array ( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) .
$this->formatRow( wfMsgExt( 'statistics-views-peredit', array( 'parseinline' ) ),
- $this->getLang()->formatNum( sprintf( '%.2f', $this->edits ?
+ $this->getLanguage()->formatNum( sprintf( '%.2f', $this->edits ?
$this->views / $this->edits : 0 ) ),
array ( 'class' => 'mw-statistics-views-peredit' ) );
}
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
if( $title instanceof Title ) {
$text .= $this->formatRow( Linker::link( $title ),
- $this->getLang()->formatNum( $row->page_counter ) );
+ $this->getLanguage()->formatNum( $row->page_counter ) );
}
}
$name = htmlspecialchars( $name );
$number = htmlspecialchars( $number );
- $return .= $this->formatRow( $name, $this->getLang()->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
+ $return .= $this->formatRow( $name, $this->getLanguage()->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
}
return $return;
$desc .= ' (' . Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ) . ')';
$newRow .= Xml::tags( 'td', null, $desc );
- $hitcount = wfMsgExt( 'tags-hitcount', array( 'parsemag' ), $this->getLang()->formatNum( $hitcount ) );
+ $hitcount = wfMsgExt( 'tags-hitcount', array( 'parsemag' ), $this->getLanguage()->formatNum( $hitcount ) );
$hitcount = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcount, array(), array( 'tagfilter' => $tag ) );
$newRow .= Xml::tags( 'td', null, $hitcount );
return;
}
- $out->addWikiMsg( 'undeletepagetext', $this->getLang()->formatNum( $result->numRows() ) );
+ $out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) );
$undelete = $this->getTitle();
$out->addHTML( "<ul>\n" );
);
$revs = wfMsgExt( 'undeleterevisions',
array( 'parseinline' ),
- $this->getLang()->formatNum( $row->count ) );
+ $this->getLanguage()->formatNum( $row->count ) );
$out->addHTML( "<li>{$link} ({$revs})</li>\n" );
}
$result->free();
// date and time are separate parameters to facilitate localisation.
// $time is kept for backward compat reasons.
- $time = $this->getLang()->timeAndDate( $timestamp, true );
- $d = $this->getLang()->date( $timestamp, true );
- $t = $this->getLang()->time( $timestamp, true );
+ $time = $this->getLanguage()->timeAndDate( $timestamp, true );
+ $d = $this->getLanguage()->date( $timestamp, true );
+ $t = $this->getLanguage()->time( $timestamp, true );
$userLink = Linker::revUserTools( $rev );
if( $this->mPreview ) {
wfMsgExt(
'revisionasof',
array( 'escape' ),
- $this->getLang()->timeanddate( $rev->getTimestamp(), true ),
- $this->getLang()->date( $rev->getTimestamp(), true ),
- $this->getLang()->time( $rev->getTimestamp(), true )
+ $this->getLanguage()->timeanddate( $rev->getTimestamp(), true ),
+ $this->getLanguage()->date( $rev->getTimestamp(), true ),
+ $this->getLanguage()->time( $rev->getTimestamp(), true )
),
array(),
$targetQuery
$file = new ArchivedFile( $this->mTargetObj, '', $this->mFilename );
$this->getOutput()->addWikiMsg( 'undelete-show-file-confirm',
$this->mTargetObj->getText(),
- $this->getLang()->date( $file->getTimestamp() ),
- $this->getLang()->time( $file->getTimestamp() ) );
+ $this->getLanguage()->date( $file->getTimestamp() ),
+ $this->getLanguage()->time( $file->getTimestamp() ) );
$this->getOutput()->addHTML(
Xml::openElement( 'form', array(
'method' => 'POST',
$titleObj = $this->getTitle();
# Last link
if( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
- $pageLink = htmlspecialchars( $this->getLang()->timeanddate( $ts, true ) );
+ $pageLink = htmlspecialchars( $this->getLanguage()->timeanddate( $ts, true ) );
$last = wfMsgHtml( 'diff' );
} elseif( $remaining > 0 || ( $earliestLiveTime && $ts > $earliestLiveTime ) ) {
$pageLink = $this->getPageLink( $rev, $titleObj, $ts );
$last = wfMsgHtml( 'diff' );
}
} else {
- $pageLink = htmlspecialchars( $this->getLang()->timeanddate( $ts, true ) );
+ $pageLink = htmlspecialchars( $this->getLanguage()->timeanddate( $ts, true ) );
$last = wfMsgHtml( 'diff' );
}
// User links
$pageLink = $this->getFileLink( $file, $this->getTitle(), $ts, $key );
} else {
$checkBox = '';
- $pageLink = $this->getLang()->timeanddate( $ts, true );
+ $pageLink = $this->getLanguage()->timeanddate( $ts, true );
}
$userLink = $this->getFileUser( $file );
$data =
wfMsg( 'widthheight',
- $this->getLang()->formatNum( $row->fa_width ),
- $this->getLang()->formatNum( $row->fa_height ) ) .
+ $this->getLanguage()->formatNum( $row->fa_width ),
+ $this->getLanguage()->formatNum( $row->fa_height ) ) .
' (' .
- wfMsg( 'nbytes', $this->getLang()->formatNum( $row->fa_size ) ) .
+ wfMsg( 'nbytes', $this->getLanguage()->formatNum( $row->fa_size ) ) .
')';
$data = htmlspecialchars( $data );
$comment = $this->getFileComment( $file );
* @return string
*/
function getPageLink( $rev, $titleObj, $ts ) {
- $time = htmlspecialchars( $this->getLang()->timeanddate( $ts, true ) );
+ $time = htmlspecialchars( $this->getLanguage()->timeanddate( $ts, true ) );
if( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
return '<span class="history-deleted">' . $time . '</span>';
*/
function getFileLink( $file, $titleObj, $ts, $key ) {
if( !$file->userCan( File::DELETED_FILE, $this->getUser() ) ) {
- return '<span class="history-deleted">' . $this->getLang()->timeanddate( $ts, true ) . '</span>';
+ return '<span class="history-deleted">' . $this->getLanguage()->timeanddate( $ts, true ) . '</span>';
} else {
$link = Linker::linkKnown(
$titleObj,
- $this->getLang()->timeanddate( $ts, true ),
+ $this->getLanguage()->timeanddate( $ts, true ),
array(),
array(
'target' => $this->mTargetObj->getPrefixedText(),
array(),
array( 'target' => $title->getPrefixedText() )
);
- return $this->getLang()->specialList( $pageLink, $wlhLink );
+ return $this->getLanguage()->specialList( $pageLink, $wlhLink );
}
function getPageHeader() {
array( 'action' => 'watch', 'token' => $token )
);
- return $this->getLang()->specialList( $plink, $wlink );
+ return $this->getLanguage()->specialList( $plink, $wlink );
}
}
case UploadBase::FILETYPE_BADTYPE:
$msg = wfMessage( 'filetype-banned-type' );
if ( isset( $details['blacklistedExt'] ) ) {
- $msg->params( $this->getLang()->commaList( $details['blacklistedExt'] ) );
+ $msg->params( $this->getLanguage()->commaList( $details['blacklistedExt'] ) );
} else {
$msg->params( $details['finalExt'] );
}
- $msg->params( $this->getLang()->commaList( $wgFileExtensions ),
+ $msg->params( $this->getLanguage()->commaList( $wgFileExtensions ),
count( $wgFileExtensions ) );
// Add PLURAL support for the first parameter. This results
'radio' => &$radio,
'help' => wfMsgExt( 'upload-maxfilesize',
array( 'parseinline', 'escapenoentities' ),
- $this->getContext()->getLang()->formatSize( $this->mMaxUploadSize['file'] )
+ $this->getContext()->getLanguage()->formatSize( $this->mMaxUploadSize['file'] )
) . ' ' . wfMsgHtml( 'upload_source_file' ),
'checked' => $selectedSourceType == 'file',
);
'radio' => &$radio,
'help' => wfMsgExt( 'upload-maxfilesize',
array( 'parseinline', 'escapenoentities' ),
- $this->getContext()->getLang()->formatSize( $this->mMaxUploadSize['url'] )
+ $this->getContext()->getLanguage()->formatSize( $this->mMaxUploadSize['url'] )
) . ' ' . wfMsgHtml( 'upload_source_url' ),
'checked' => $selectedSourceType == 'url',
);
# Everything not permitted is banned
$extensionsList =
'<div id="mw-upload-permitted">' .
- wfMsgExt( 'upload-permitted', 'parse', $this->getContext()->getLang()->commaList( $wgFileExtensions ) ) .
+ wfMsgExt( 'upload-permitted', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) ) .
"</div>\n";
} else {
# We have to list both preferred and prohibited
$extensionsList =
'<div id="mw-upload-preferred">' .
- wfMsgExt( 'upload-preferred', 'parse', $this->getContext()->getLang()->commaList( $wgFileExtensions ) ) .
+ wfMsgExt( 'upload-preferred', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) ) .
"</div>\n" .
'<div id="mw-upload-prohibited">' .
- wfMsgExt( 'upload-prohibited', 'parse', $this->getContext()->getLang()->commaList( $wgFileBlacklist ) ) .
+ wfMsgExt( 'upload-prohibited', 'parse', $this->getContext()->getLanguage()->commaList( $wgFileBlacklist ) ) .
"</div>\n";
}
} else {
}
}
return count( $links ) > 0 ? $this->msg( 'loginlanguagelabel' )->rawParams(
- $this->getLang()->pipeList( $links ) )->escaped() : '';
+ $this->getLanguage()->pipeList( $links ) )->escaped() : '';
} else {
return '';
}
$count = count( $list );
if( $count > 0 ) {
$grouplist = wfMessage( 'userrights-groupsmember', $count)->parse();
- $grouplist = '<p>' . $grouplist . ' ' . $this->getLang()->listToText( $list ) . "</p>\n";
+ $grouplist = '<p>' . $grouplist . ' ' . $this->getLanguage()->listToText( $list ) . "</p>\n";
}
$count = count( $autolist );
if( $count > 0 ) {
$autogrouplistintro = wfMessage( 'userrights-groupsmember-auto', $count)->parse();
- $grouplist .= '<p>' . $autogrouplistintro . ' ' . $this->getLang()->listToText( $autolist ) . "</p>\n";
+ $grouplist .= '<p>' . $autogrouplistintro . ' ' . $this->getLanguage()->listToText( $autolist ) . "</p>\n";
}
$userToolLinks = Linker::userToolLinks(
if( $a['name'] === $b['name'] ) {
return 0;
} else {
- return $this->getLang()->lc( $a['name'] ) > $this->getLang()->lc( $b['name'] )
+ return $this->getLanguage()->lc( $a['name'] ) > $this->getLanguage()->lc( $b['name'] )
? 1
: -1;
}
if ( $sort ) {
sort( $list );
}
- return $this->getLang()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
+ return $this->getLanguage()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
}
}
array( 'broken' )
);
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
$lang->formatNum( $result->value ) );
return $lang->specialList( $plink, $nlinks );
$output->showLagWarning( $lag );
}
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
# Create output form
$form = Xml::fieldset( wfMsg( 'watchlist-options' ), false, array( 'id' => 'mw-watchlist-options' ) );
return Linker::linkKnown(
$this->getTitle(),
- $this->getLang()->formatNum( $h ),
+ $this->getLanguage()->formatNum( $h ),
array(),
$options
);
protected function daysLink( $d, $options = array() ) {
$options['days'] = $d;
- $message = ( $d ? $this->getLang()->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) );
+ $message = ( $d ? $this->getLanguage()->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) );
return Linker::linkKnown(
$this->getTitle(),
}
return wfMsgExt('wlshowlast',
array('parseinline', 'replaceafter'),
- $this->getLang()->pipeList( $hours ),
- $this->getLang()->pipeList( $days ),
+ $this->getLanguage()->pipeList( $hours ),
+ $this->getLanguage()->pipeList( $days ),
$this->daysLink( 0, $options ) );
}
}
protected function listItem( $row, $nt, $notClose = false ) {
- $dirmark = $this->getLang()->getDirMark();
+ $dirmark = $this->getLanguage()->getDirMark();
# local message cache
static $msgcache = null;
}
$limitLinks = array();
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
foreach ( $this->limits as $limit ) {
$prettyLimit = htmlspecialchars( $lang->formatNum( $limit ) );
$overrides = array( 'limit' => $limit );
$overrides = array( $type => !$chosen );
$links[] = wfMsgHtml( "whatlinkshere-{$type}", $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ) );
}
- return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $this->getLang()->pipeList( $links ) );
+ return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $this->getLanguage()->pipeList( $links ) );
}
}
$s .= '<td class="bottom">';
$s .= $this->bottomLinks();
- $s .= $this->getSkin()->getLang()->pipeList( array(
+ $s .= $this->getSkin()->getLanguage()->pipeList( array(
"\n<br />" . Linker::link(
Title::newMainPage(),
null,
);
}
- return $this->getSkin()->getLang()->pipeList( $s );
+ return $this->getSkin()->getLanguage()->pipeList( $s );
}
/**
wfProfileOut( __METHOD__ . '-1' );
wfProfileIn( __METHOD__ . '-2' );
- $l = $this->getSkin()->getLang()->alignStart();
+ $l = $this->getSkin()->getLanguage()->alignStart();
$s .= "<td class='bottom' align='$l' valign='top'>";
$s .= $this->bottomLinks();
- $s .= "\n<br />" . $this->getSkin()->getLang()->pipeList( array(
+ $s .= "\n<br />" . $this->getSkin()->getLanguage()->pipeList( array(
$this->getSkin()->mainPageLink(),
$this->getSkin()->aboutLink(),
Linker::specialLink( 'Recentchanges' ),
// $wgContLang = new StubContLang;
$wgUser = new User;
$context = new RequestContext;
- $wgLang = $context->getLang();
+ $wgLang = $context->getLanguage();
$wgOut = $context->getOutput();
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
$wgRequest = $context->getRequest();
$GLOBALS['wgMemc'] = new EmptyBagOStuff;
$context = new RequestContext();
- $GLOBALS['wgLang'] = $context->getLang();
+ $GLOBALS['wgLang'] = $context->getLanguage();
$GLOBALS['wgOut'] = $context->getOutput();
$GLOBALS['wgUser'] = new User();
// $tmpGlobals['wgContLang'] = new StubContLang;
$tmpGlobals['wgUser'] = new User;
$context = new RequestContext();
- $tmpGlobals['wgLang'] = $context->getLang();
+ $tmpGlobals['wgLang'] = $context->getLanguage();
$tmpGlobals['wgOut'] = $context->getOutput();
$tmpGlobals['wgParser'] = new StubObject( 'wgParser', $GLOBALS['wgParserConf']['class'], array( $GLOBALS['wgParserConf'] ) );
$tmpGlobals['wgRequest'] = $context->getRequest();
$langObj = Language::factory( $lang );
$GLOBALS['wgContLang'] = $langObj;
$context = new RequestContext();
- $GLOBALS['wgLang'] = $context->getLang();
+ $GLOBALS['wgLang'] = $context->getLanguage();
$GLOBALS['wgMemc'] = new EmptyBagOStuff;
$GLOBALS['wgOut'] = $context->getOutput();
// $wgContLang = new StubContLang;
$wgUser = new User;
$context = new RequestContext;
- $wgLang = $context->getLang();
+ $wgLang = $context->getLanguage();
$wgOut = $context->getOutput();
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
$wgRequest = $context->getRequest();