Bug 29524 - Rename RequestContext::getLang to getLanguage
authorJohn Du Hart <johnduhart@users.mediawiki.org>
Mon, 21 Nov 2011 16:13:21 +0000 (16:13 +0000)
committerJohn Du Hart <johnduhart@users.mediawiki.org>
Mon, 21 Nov 2011 16:13:21 +0000 (16:13 +0000)
I'll be amazed if this doens't break any tests.

84 files changed:
includes/Action.php
includes/Article.php
includes/CategoryViewer.php
includes/ChangesList.php
includes/Message.php
includes/OutputPage.php
includes/Pager.php
includes/Preferences.php
includes/QueryPage.php
includes/RevisionList.php
includes/Skin.php
includes/SkinTemplate.php
includes/SpecialPage.php
includes/SpecialPageFactory.php
includes/StubObject.php
includes/actions/CreditsAction.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/actions/RevertAction.php
includes/cache/HTMLFileCache.php
includes/context/ContextSource.php
includes/context/DerivativeContext.php
includes/context/IContextSource.php
includes/context/RequestContext.php
includes/diff/DifferenceEngine.php
includes/logging/LogFormatter.php
includes/parser/ParserOptions.php
includes/revisiondelete/RevisionDelete.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialAllmessages.php
includes/specials/SpecialAllpages.php
includes/specials/SpecialAncientpages.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialCategories.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialDisambiguations.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialFewestrevisions.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialImport.php
includes/specials/SpecialLinkSearch.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialListredirects.php
includes/specials/SpecialListusers.php
includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMostcategories.php
includes/specials/SpecialMostlinked.php
includes/specials/SpecialMostlinkedcategories.php
includes/specials/SpecialMostlinkedtemplates.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewimages.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialPopularpages.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialSearch.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialTags.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUnusedtemplates.php
includes/specials/SpecialUnwatchedpages.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWantedcategories.php
includes/specials/SpecialWatchlist.php
includes/specials/SpecialWhatlinkshere.php
skins/CologneBlue.php
skins/Standard.php
tests/parser/parserTest.inc
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php

index 2287941..fd4a0a6 100644 (file)
@@ -23,7 +23,7 @@
  *
  * @file
  */
-abstract class Action {
+abstract class Action extends ContextSource {
 
        /**
         * Page on which we're performing the action
@@ -95,81 +95,6 @@ abstract class 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
index 6901165..92e6f06 100644 (file)
@@ -666,8 +666,8 @@ class Article extends Page {
        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' );
index c64bb73..cfebdd1 100644 (file)
@@ -108,7 +108,7 @@ class CategoryViewer extends ContextSource {
                        $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>';
index d8eab43..d603c16 100644 (file)
@@ -235,7 +235,7 @@ class ChangesList extends ContextSource {
 
        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";
@@ -326,7 +326,7 @@ class ChangesList extends ContextSource {
                        $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) );
@@ -341,7 +341,7 @@ class ChangesList extends ContextSource {
         */
        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
@@ -352,7 +352,7 @@ class ChangesList extends ContextSource {
                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'] );
                }
        }
@@ -364,7 +364,7 @@ class ChangesList extends ContextSource {
        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();
        }
 
@@ -399,7 +399,7 @@ class ChangesList extends ContextSource {
                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 {
@@ -572,7 +572,7 @@ class OldChangesList extends ChangesList {
                        # User tool links
                        $this->insertUserRelatedLinks( $s, $rc );
                        # LTR/RTL direction mark
-                       $s .= $this->getLang()->getDirMark();
+                       $s .= $this->getLanguage()->getDirMark();
                        $s .= $this->insertComment( $rc );
                }
 
@@ -586,7 +586,7 @@ class OldChangesList extends ChangesList {
                # 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 ) {
@@ -635,7 +635,7 @@ class EnhancedChangesList extends ChangesList {
                $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
@@ -689,7 +689,7 @@ class EnhancedChangesList extends ChangesList {
                        $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;
@@ -838,9 +838,9 @@ class EnhancedChangesList extends ChangesList {
                $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 );
                }
@@ -880,14 +880,14 @@ class EnhancedChangesList extends ChangesList {
                        $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 .= ' ';
index 578e5f1..e253b4a 100644 (file)
@@ -211,7 +211,7 @@ class Message {
         * @return Message: $this
         */
        public function setContext( IContextSource $context ) {
-               $this->inLanguage( $context->getLang() );
+               $this->inLanguage( $context->getLanguage() );
                $this->title( $context->getTitle() );
 
                return $this;
index 93fd649..398cdde 100644 (file)
@@ -2244,7 +2244,7 @@ $templates
                                ? '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 ) ) );
                }
        }
 
@@ -2328,14 +2328,14 @@ $templates
         */
        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() ) );
@@ -2370,7 +2370,7 @@ $templates
                # 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';
                }
@@ -2504,7 +2504,7 @@ $templates
                        // 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
@@ -2560,7 +2560,7 @@ $templates
 
                        $url = ResourceLoader::makeLoaderURL(
                                array_keys( $modules ),
-                               $this->getLang()->getCode(),
+                               $this->getLanguage()->getCode(),
                                $this->getSkin()->getSkinName(),
                                $user,
                                $version,
@@ -3070,7 +3070,7 @@ $templates
         * @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 );
                }
@@ -3189,7 +3189,7 @@ $templates
         */
        protected function styleLink( $style, $options ) {
                if( isset( $options['dir'] ) ) {
-                       if( $this->getLang()->getDir() != $options['dir'] ) {
+                       if( $this->getLanguage()->getDir() != $options['dir'] ) {
                                return '';
                        }
                }
index 57eb926..a03a1d1 100644 (file)
@@ -551,7 +551,7 @@ abstract class IndexPager extends ContextSource implements Pager {
                }
                foreach ( $this->mLimitsShown as $limit ) {
                        $links[] = $this->makeLink(
-                               $this->getLang()->formatNum( $limit ),
+                               $this->getLanguage()->formatNum( $limit ),
                                array( 'offset' => $offset, 'limit' => $limit ),
                                'num'
                        );
@@ -657,7 +657,7 @@ abstract class AlphabeticPager extends IndexPager {
                        return $this->mNavigationBar;
                }
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                $opts = array( 'parsemag', 'escapenoentities' );
                $linkTexts = array(
@@ -750,7 +750,7 @@ abstract class ReverseChronologicalPager extends IndexPager {
                        return $this->mNavigationBar;
                }
 
-               $nicenumber = $this->getLang()->formatNum( $this->mLimit );
+               $nicenumber = $this->getLanguage()->formatNum( $this->mLimit );
                $linkTexts = array(
                        'prev' => wfMsgExt(
                                'pager-newer-n',
@@ -768,7 +768,7 @@ abstract class ReverseChronologicalPager extends IndexPager {
 
                $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' ) .
@@ -1016,7 +1016,7 @@ abstract class TablePager extends IndexPager {
                        '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 ) );
@@ -1060,7 +1060,7 @@ abstract class TablePager extends IndexPager {
                        # 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;
index b82d662..7126b2b 100644 (file)
@@ -171,7 +171,7 @@ class Preferences {
                asort( $userGroups );
                asort( $userMembers );
 
-               $lang = $context->getLang();
+               $lang = $context->getLanguage();
 
                $defaultPreferences['usergroups'] = array(
                        'type' => 'info',
@@ -485,7 +485,7 @@ class Preferences {
                        $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',
                        );
@@ -493,7 +493,7 @@ class Preferences {
 
                $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',
@@ -545,7 +545,7 @@ class Preferences {
 
                // 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 ) .
@@ -1082,7 +1082,7 @@ class Preferences {
                                $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;
                }
 
@@ -1094,7 +1094,7 @@ class Preferences {
         * @return array
         */
        static function getDateOptions( IContextSource $context ) {
-               $dateopts = $context->getLang()->getDatePreferences();
+               $dateopts = $context->getLanguage()->getDatePreferences();
 
                $ret = array();
 
@@ -1115,7 +1115,7 @@ class Preferences {
                                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;
                        }
index eac869a..ef675c0 100644 (file)
@@ -470,7 +470,7 @@ abstract class QueryPage extends SpecialPage {
                                $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 );
@@ -505,7 +505,7 @@ abstract class QueryPage extends SpecialPage {
                                $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 {
@@ -777,7 +777,7 @@ abstract class WantedQueryPage extends QueryPage {
                                        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();
                }
index 5a9bbad..814e2df 100644 (file)
@@ -2,15 +2,11 @@
 /**
  * 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;
 
@@ -20,7 +16,7 @@ abstract class RevisionListBase {
         * @param $title Title
         */
        function __construct( IContextSource $context, Title $title ) {
-               $this->context = $context;
+               $this->setContext( $context );
                $this->title = $title;
        }
 
@@ -104,24 +100,6 @@ abstract class RevisionListBase {
         * @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();
-       }
 }
 
 /**
@@ -187,16 +165,16 @@ abstract class RevisionItemBase {
         * 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() );
        }
 
        /**
@@ -316,7 +294,7 @@ class RevisionItem extends RevisionItemBase {
         * 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;
                }
index 26de63c..dc697a3 100644 (file)
@@ -739,7 +739,7 @@ abstract class Skin extends ContextSource {
                $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;
@@ -801,8 +801,8 @@ abstract class Skin extends ContextSource {
                }
 
                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 = '';
@@ -1061,7 +1061,7 @@ abstract class Skin extends ContextSource {
                global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
                wfProfileIn( __METHOD__ );
 
-               $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
+               $key = wfMemcKey( 'sidebar', $this->getLanguage()->getCode() );
 
                if ( $wgEnableSidebarCache ) {
                        $cachedsidebar = $parserMemc->get( $key );
index 807921b..2ab01bc 100644 (file)
@@ -296,14 +296,14 @@ class SkinTemplate extends Skin {
 
                $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 );
index 60ed5dd..64c4287 100644 (file)
@@ -27,7 +27,7 @@
  * 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()
@@ -611,81 +611,6 @@ class SpecialPage {
                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
         *
index 27cdc3e..b6aa423 100644 (file)
@@ -503,7 +503,7 @@ class SpecialPageFactory {
                $wgOut = $context->getOutput();
                $wgRequest = $context->getRequest();
                $wgUser = $context->getUser();
-               $wgLang = $context->getLang();
+               $wgLang = $context->getLanguage();
 
                // The useful part
                $ret = self::executePath( $title, $context, true );
index 141de57..3f6b8b1 100644 (file)
@@ -156,6 +156,6 @@ class StubUserLang extends StubObject {
         * @return Language
         */
        function _newObject() {
-               return RequestContext::getMain()->getLang();
+               return RequestContext::getMain()->getLanguage();
        }
 }
index 17361cc..f28159f 100644 (file)
@@ -88,7 +88,7 @@ class CreditsAction extends FormlessAction {
 
                $timestamp = $article->getTimestamp();
                if ( $timestamp ) {
-                       $lang = $this->getLang();
+                       $lang = $this->getLanguage();
                        $d = $lang->date( $article->getTimestamp(), true );
                        $t = $lang->time( $article->getTimestamp(), true );
                } else {
@@ -143,7 +143,7 @@ class CreditsAction extends FormlessAction {
                        }
                }
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                if ( count( $real_names ) ) {
                        $real = $lang->listToText( $real_names );
index d2c71a3..ac35b0a 100644 (file)
@@ -560,7 +560,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s .= " $del ";
                }
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                $dirmark = $lang->getDirMark();
 
                $s .= " $link";
@@ -646,7 +646,7 @@ class HistoryPager extends ReverseChronologicalPager {
         * @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(
index 4854d30..715f1f9 100644 (file)
@@ -68,13 +68,13 @@ class InfoAction extends FormlessAction {
                        ) .
                        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(),
@@ -82,7 +82,7 @@ class InfoAction extends FormlessAction {
                                ) .
                                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 ? '' :
@@ -91,13 +91,13 @@ class InfoAction extends FormlessAction {
                                ) .
                                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 ) ) )
                                )
                        )
                );
index 9c6777a..f002ef1 100644 (file)
@@ -95,7 +95,7 @@ class RevertFileAction extends FormAction {
                                '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
                                ) )
@@ -119,8 +119,8 @@ class RevertFileAction extends FormAction {
        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
                ) ) );
index 671b150..b846e41 100644 (file)
@@ -83,7 +83,7 @@ class HTMLFileCache extends FileCacheBase {
                $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;
index 6d423e9..0eb5d3e 100644 (file)
@@ -96,10 +96,20 @@ abstract class ContextSource implements IContextSource {
        /**
         * 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();
        }
 
        /**
index 1ea52a2..a6a36d7 100644 (file)
@@ -172,16 +172,24 @@ class DerivativeContext extends ContextSource {
                }
        }
 
+       /**
+        * @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();
                }
        }
 
index 12dd1a1..4a8e93b 100644 (file)
@@ -59,10 +59,18 @@ interface IContextSource {
        /**
         * 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
         *
index 3cbe253..631d60d 100644 (file)
@@ -179,12 +179,20 @@ class RequestContext implements IContextSource {
                }
        }
 
+       /**
+        * @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(
index a57d4b0..6fd2d64 100644 (file)
@@ -842,7 +842,7 @@ class DifferenceEngine extends ContextSource {
         * @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 );
index 73a39a7..441c22b 100644 (file)
@@ -274,7 +274,7 @@ class LogFormatter {
         */
        protected function msg( $key ) {
                return wfMessage( $key )
-                       ->inLanguage( $this->context->getLang() )
+                       ->inLanguage( $this->context->getLanguage() )
                        ->title( $this->context->getTitle() );
        }
 
@@ -395,13 +395,13 @@ class DeleteLogFormatter extends LogFormatter {
                                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 );
@@ -442,7 +442,7 @@ class PatrolLogFormatter extends LogFormatter {
 
                $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;
index 7cf3f74..f26a2e4 100644 (file)
@@ -232,7 +232,7 @@ class ParserOptions {
         * @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 */
index 0ba6675..1504ffa 100644 (file)
@@ -193,7 +193,7 @@ class RevDel_RevisionItem extends RevDel_Item {
         * 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;
                }
@@ -340,7 +340,7 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
 
        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;
                }
@@ -571,7 +571,7 @@ class RevDel_FileItem extends RevDel_Item {
         * 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() ) {
@@ -634,11 +634,11 @@ class RevDel_FileItem extends RevDel_Item {
                $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() . ' ' .
@@ -722,7 +722,7 @@ class RevDel_ArchivedFileItem extends RevDel_FileItem {
        }
 
        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...
@@ -847,7 +847,7 @@ class RevDel_LogItem extends RevDel_Item {
        }
 
        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 );
 
@@ -875,7 +875,7 @@ class RevDel_LogItem extends RevDel_Item {
                        $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>';
                }
index 60b3a5d..7b65903 100644 (file)
@@ -119,7 +119,7 @@ class ActiveUsersPager extends UsersPager {
                $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 ) {
@@ -190,7 +190,7 @@ class SpecialActiveUsers extends SpecialPage {
 
                $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() );
 
index 5ab48dd..da23f5b 100644 (file)
@@ -126,7 +126,7 @@ class AllmessagesTablePager extends TablePager {
                        $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();
@@ -350,11 +350,11 @@ class AllmessagesTablePager extends TablePager {
                                $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' )
@@ -403,7 +403,7 @@ class AllmessagesTablePager extends TablePager {
                        $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;
        }
index 8cf9333..bd83b55 100644 (file)
@@ -425,7 +425,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                                        array(),
                                        $query
                                );
-                               $out2 = $this->getLang()->pipeList( array( $out2, $prevLink ) );
+                               $out2 = $this->getLanguage()->pipeList( array( $out2, $prevLink ) );
                        }
 
                        if( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
@@ -442,7 +442,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                                        array(),
                                        $query
                                );
-                               $out2 = $this->getLang()->pipeList( array( $out2, $nextLink ) );
+                               $out2 = $this->getLanguage()->pipeList( array( $out2, $nextLink ) );
                        }
                        $out2 .= "</td></tr></table>";
                }
@@ -457,7 +457,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                        $output->addHTML(
                                Html::element( 'hr' ) .
                                Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ),
-                                       $this->getLang()->pipeList( $links )
+                                       $this->getLanguage()->pipeList( $links )
                                ) );
                }
 
index 9027374..1203e1f 100644 (file)
@@ -61,12 +61,12 @@ class AncientPagesPage extends QueryPage {
        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 ) );
        }
 }
index f35709f..fab295a 100644 (file)
@@ -377,7 +377,7 @@ class SpecialBlock extends FormSpecialPage {
                $text =  Html::rawElement(
                        'p',
                        array( 'class' => 'mw-ipb-conveniencelinks' ),
-                       $this->getLang()->pipeList( $links )
+                       $this->getLanguage()->pipeList( $links )
                );
 
                if( $this->target instanceof User ){
index 9891e28..f0617b7 100644 (file)
@@ -252,7 +252,7 @@ class BlockListPager extends TablePager {
 
                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':
@@ -278,7 +278,7 @@ class BlockListPager extends TablePager {
                                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(
@@ -300,7 +300,7 @@ class BlockListPager extends TablePager {
                                        $formatted .= ' ' . Html::rawElement(
                                                'span',
                                                array( 'class' => 'mw-blocklist-actions' ),
-                                               wfMsg( 'parentheses', $this->getLang()->pipeList( $links ) )
+                                               wfMsg( 'parentheses', $this->getLanguage()->pipeList( $links ) )
                                        );
                                }
                                break;
@@ -338,7 +338,7 @@ class BlockListPager extends TablePager {
                                        $properties[] = $msg['blocklist-nousertalk'];
                                }
 
-                               $formatted = $this->getLang()->commaList( $properties );
+                               $formatted = $this->getLanguage()->commaList( $properties );
                                break;
 
                        default:
index cf36ae7..5279481 100644 (file)
@@ -114,7 +114,7 @@ class BrokenRedirectsPage extends PageQueryPage {
                        array(),
                        array( 'broken' )
                );
-               $arr = $this->getLang()->getArrow();
+               $arr = $this->getLanguage()->getArrow();
 
                $out = $from . $this->msg( 'word-separator' )->escaped();
 
@@ -127,7 +127,7 @@ class BrokenRedirectsPage extends PageQueryPage {
                        );
                }
 
-               $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;
        }
index a2b5695..6d2831c 100644 (file)
@@ -115,7 +115,7 @@ class CategoryPager extends AlphabeticPager {
                $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 ) {
index 9fe6242..3ef842b 100644 (file)
@@ -125,7 +125,7 @@ class SpecialChangePassword extends UnlistedSpecialPage {
                                '<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>' .
index 49c3c4e..4a10b38 100644 (file)
@@ -87,9 +87,9 @@ class EmailConfirmation extends UnlistedSpecialPage {
                                // 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() ) {
index 6c732cb..a6741bf 100644 (file)
@@ -222,7 +222,7 @@ class SpecialContributions extends SpecialPage {
                $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() ) {
@@ -674,8 +674,8 @@ class ContribsPager extends ReverseChronologicalPager {
                        $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,
index 1b1ac16..c35bf14 100644 (file)
@@ -95,7 +95,7 @@ class DeletedContribsPager extends IndexPager {
                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 ),
@@ -182,7 +182,7 @@ class DeletedContribsPager extends IndexPager {
                }
 
                $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
@@ -217,7 +217,7 @@ class DeletedContribsPager extends IndexPager {
                $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}";
@@ -412,7 +412,7 @@ class DeletedContributionsPage extends SpecialPage {
 
                        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() ) {
index 51cb4db..8b7f667 100644 (file)
@@ -128,7 +128,7 @@ class DisambiguationsPage extends PageQueryPage {
                $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";
index 7dd337d..78f5531 100644 (file)
@@ -121,7 +121,7 @@ class DoubleRedirectsPage extends PageQueryPage {
 
                $linkC = Linker::linkKnown( $titleC );
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                $arr = $lang->getArrow() . $lang->getDirMark();
 
                return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
index e305ff8..80c6ee8 100644 (file)
@@ -137,7 +137,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        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 );
                        }
@@ -145,7 +145,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        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 );
                        }
@@ -161,7 +161,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
 
                        $this->successMessage .= ' ' . wfMessage(
                                'watchlistedit-raw-removed',
-                               $this->getLang()->formatNum( count( $current ) )
+                               $this->getLanguage()->formatNum( count( $current ) )
                        );
                        $this->showTitles( $current, $this->successMessage );
                }
@@ -360,7 +360,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                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;
@@ -417,7 +417,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                                        ? 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 {
@@ -463,7 +463,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
 
                wfRunHooks( 'WatchlistEditorBuildRemoveLine', array( &$tools, $title, $title->isRedirect(), $this->getSkin() ) );
 
-               return $link . " (" . $this->getLang()->pipeList( $tools ) . ")";
+               return $link . " (" . $this->getLanguage()->pipeList( $tools ) . ")";
        }
 
        /**
@@ -557,7 +557,7 @@ class EditWatchlistNormalHTMLForm extends HTMLForm {
                $namespace = substr( $namespace, 2 );
                return $namespace == NS_MAIN
                        ? wfMsgHtml( 'blanknamespace' )
-                       : htmlspecialchars( $this->getContext()->getLang()->getFormattedNsText( $namespace ) );
+                       : htmlspecialchars( $this->getContext()->getLanguage()->getFormattedNsText( $namespace ) );
        }
 }
 
index a59f78f..27d17f6 100644 (file)
@@ -90,6 +90,6 @@ class FewestrevisionsPage extends QueryPage {
                        array( 'action' => 'history' )
                ) . $redirect;
 
-               return $this->getLang()->specialList( $plink, $nlink );
+               return $this->getLanguage()->specialList( $plink, $nlink );
        }
 }
index 0a7a6ef..8f66b5c 100644 (file)
@@ -133,9 +133,9 @@ class FileDuplicateSearchPage extends QueryPage {
                                        $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>' );
@@ -155,7 +155,7 @@ class FileDuplicateSearchPage extends QueryPage {
                                $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 ) )
                                );
                        }
 
@@ -181,7 +181,7 @@ class FileDuplicateSearchPage extends QueryPage {
 
                $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";
        }
index c5e944a..e8c5762 100644 (file)
@@ -354,7 +354,7 @@ class ImportReporter extends ContextSource {
 
                $this->mPageCount++;
 
-               $localCount = $this->getLang()->formatNum( $successCount );
+               $localCount = $this->getLanguage()->formatNum( $successCount );
                $contentCount = $wgContLang->formatNum( $successCount );
 
                if( $successCount > 0 ) {
@@ -403,7 +403,7 @@ class ImportReporter extends ContextSource {
                $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" );
index a37bdec..eb42206 100644 (file)
@@ -82,7 +82,7 @@ class LinkSearchPage extends QueryPage {
                        $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>' .
index 1e73fef..b575499 100644 (file)
@@ -198,7 +198,7 @@ class ImageListPager extends TablePager {
                                $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' );
@@ -226,7 +226,7 @@ class ImageListPager extends TablePager {
                                }
                                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':
index 00bab56..91d8ed8 100644 (file)
@@ -169,7 +169,7 @@ class SpecialListGroupRights extends SpecialPage {
                        }
                }
                sort( $r );
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                if( $add === true ){
                        $r[] = wfMsgExt( 'listgrouprights-addgroup-all', array( 'escape' ) );
                } elseif( is_array( $add ) && count( $add ) ) {
index 1a9f601..1a25d6c 100644 (file)
@@ -109,7 +109,7 @@ class ListredirectsPage extends QueryPage {
                $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";
index a4890a1..b1ff6ea 100644 (file)
@@ -131,7 +131,7 @@ class UsersPager extends AlphabeticPager {
                $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 ) {
index b06a95b..2ce8ec4 100644 (file)
@@ -94,7 +94,7 @@ class MIMEsearchPage extends QueryPage {
                );
 
                $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',
index e0dd331..19650da 100644 (file)
@@ -253,7 +253,7 @@ class SpecialMergeHistory extends SpecialPage {
 
                $pageLink = Linker::linkKnown(
                        $rev->getTitle(),
-                       htmlspecialchars( $this->getLang()->timeanddate( $ts ) ),
+                       htmlspecialchars( $this->getLanguage()->timeanddate( $ts ) ),
                        array(),
                        array( 'oldid' => $rev->getId() )
                );
index f75b521..98b7367 100644 (file)
@@ -62,6 +62,6 @@ class MostcategoriesPage extends QueryPage {
 
                $count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
                $link = Linker::link( $title );
-               return $this->getLang()->specialList( $link, $count );
+               return $this->getLanguage()->specialList( $link, $count );
        }
 }
index 390049f..a16f087 100644 (file)
@@ -99,6 +99,6 @@ class MostlinkedPage extends QueryPage {
                $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 );
        }
 }
index 9cbc936..7fb9dea 100644 (file)
@@ -82,6 +82,6 @@ class MostlinkedCategoriesPage extends QueryPage {
                $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 );
        }
 }
index 406173a..6fb0942 100644 (file)
@@ -98,7 +98,7 @@ class MostlinkedTemplatesPage extends QueryPage {
        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 )
                );
index e3003da..5eb0247 100644 (file)
@@ -304,7 +304,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                                        ? 'move-subpages'
                                                        : 'move-talk-subpages' ),
                                                array( 'parseinline' ),
-                                               $this->getLang()->formatNum( $wgMaximumMovedPages ),
+                                               $this->getLanguage()->formatNum( $wgMaximumMovedPages ),
                                                # $2 to allow use of PLURAL in message.
                                                $wgMaximumMovedPages
                                        )
@@ -366,7 +366,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        # 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;
                        }
 
@@ -553,7 +553,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                        $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 {
@@ -608,7 +608,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        return;
                }
 
-               $out->addWikiMsg( 'movesubpagetext', $this->getLang()->formatNum( $count ) );
+               $out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) );
                $out->addHTML( "<ul>\n" );
 
                foreach( $subpages as $subpage ) {
index 99a17f2..5dc951e 100644 (file)
@@ -115,7 +115,7 @@ class NewFilesPager extends ReverseChronologicalPager {
                $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"
                );
        }
index 3b50f83..ecec87d 100644 (file)
@@ -111,7 +111,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                                $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 );
                                }
@@ -200,7 +200,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                        $links[$key] = wfMsgHtml( $msg, $link );
                }
 
-               return $this->getLang()->pipeList( $links );
+               return $this->getLanguage()->pipeList( $links );
        }
 
        protected function form() {
@@ -294,7 +294,7 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                $classes = array();
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                $dm = $lang->getDirMark();
 
                $title = Title::newFromRow( $result );
index 63a3267..803f03e 100644 (file)
@@ -62,6 +62,6 @@ class PopularPagesPage extends QueryPage {
                        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 );
        }
 }
index 7c96faa..eec974f 100644 (file)
@@ -97,7 +97,7 @@ class SpecialProtectedpages extends SpecialPage {
                }
 
                $stxt = '';
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                $expiry = $lang->formatExpiry( $row->pr_expiry, TS_MW );
                if( $expiry != $infinity ) {
index 81f3812..982feb6 100644 (file)
@@ -90,7 +90,7 @@ class SpecialProtectedtitles extends SpecialPage {
 
                $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(
index c6b123b..85b93b0 100644 (file)
@@ -774,10 +774,10 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                }
                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.
@@ -790,17 +790,17 @@ class SpecialRecentChanges extends IncludableSpecialPage {
 
                // 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
@@ -830,13 +830,13 @@ class SpecialRecentChanges extends IncludableSpecialPage {
 
                // 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";
        }
index 9f15fc2..dce79d3 100644 (file)
@@ -245,7 +245,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                }
                        }
                        # Logs themselves don't have histories or archived revisions
-                       $this->getOutput()->addSubtitle( $this->getLang()->pipeList( $links ) );
+                       $this->getOutput()->addSubtitle( $this->getLanguage()->pipeList( $links ) );
                }
        }
 
@@ -286,8 +286,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                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',
@@ -335,7 +335,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $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 ) );
index d517258..022744f 100644 (file)
@@ -344,7 +344,7 @@ class SpecialSearch extends SpecialPage {
                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
                        );
@@ -600,7 +600,7 @@ class SpecialSearch extends SpecialPage {
                // format text extract
                $extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                // format score
                if( is_null( $result->getScore() ) ) {
@@ -1001,7 +1001,7 @@ class SpecialSearch extends SpecialPage {
                }
 
                $profiles = $this->getSearchProfiles();
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                // Outputs XML for Search Types
                $out .= Xml::openElement( 'div', array( 'class' => 'search-types' ) );
index 1e84e45..9bc1bc4 100644 (file)
@@ -78,7 +78,7 @@ class ShortPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               $dm = $this->getLang()->getDirMark();
+               $dm = $this->getLanguage()->getDirMark();
 
                $title = Title::makeTitle( $result->namespace, $result->title );
                if ( !$title ) {
index 307725f..b9c092b 100644 (file)
@@ -140,15 +140,15 @@ class SpecialStatistics extends SpecialPage {
                        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() {
@@ -156,10 +156,10 @@ class SpecialStatistics extends SpecialPage {
                        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' ) );
        }
 
@@ -169,17 +169,17 @@ class SpecialStatistics extends SpecialPage {
                        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() {
@@ -221,7 +221,7 @@ class SpecialStatistics extends SpecialPage {
                                $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;
@@ -232,10 +232,10 @@ class SpecialStatistics extends SpecialPage {
                        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' ) );
        }
@@ -268,7 +268,7 @@ class SpecialStatistics extends SpecialPage {
                                        $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 ) );
 
                                        }
                                }
@@ -289,7 +289,7 @@ class SpecialStatistics extends SpecialPage {
                        $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;
index d6011d2..adfc744 100644 (file)
@@ -83,7 +83,7 @@ class SpecialTags extends SpecialPage {
                $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 );
 
index bc6cdfd..f58aa1d 100644 (file)
@@ -738,7 +738,7 @@ class SpecialUndelete extends SpecialPage {
                        return;
                }
 
-               $out->addWikiMsg( 'undeletepagetext', $this->getLang()->formatNum( $result->numRows() ) );
+               $out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) );
 
                $undelete = $this->getTitle();
                $out->addHTML( "<ul>\n" );
@@ -752,7 +752,7 @@ class SpecialUndelete extends SpecialPage {
                        );
                        $revs = wfMsgExt( 'undeleterevisions',
                                array( 'parseinline' ),
-                               $this->getLang()->formatNum( $row->count ) );
+                               $this->getLanguage()->formatNum( $row->count ) );
                        $out->addHTML( "<li>{$link} ({$revs})</li>\n" );
                }
                $result->free();
@@ -810,9 +810,9 @@ class SpecialUndelete extends SpecialPage {
 
                // 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 ) {
@@ -938,9 +938,9 @@ class SpecialUndelete extends SpecialPage {
                                        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
@@ -961,8 +961,8 @@ class SpecialUndelete extends SpecialPage {
                $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',
@@ -1176,7 +1176,7 @@ class SpecialUndelete extends SpecialPage {
                        $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 );
@@ -1195,7 +1195,7 @@ class SpecialUndelete extends SpecialPage {
                                $last = wfMsgHtml( 'diff' );
                        }
                } else {
-                       $pageLink = htmlspecialchars( $this->getLang()->timeanddate( $ts, true ) );
+                       $pageLink = htmlspecialchars( $this->getLanguage()->timeanddate( $ts, true ) );
                        $last = wfMsgHtml( 'diff' );
                }
                // User links
@@ -1222,15 +1222,15 @@ class SpecialUndelete extends SpecialPage {
                        $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 );
@@ -1264,7 +1264,7 @@ class SpecialUndelete extends SpecialPage {
         * @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>';
@@ -1293,11 +1293,11 @@ class SpecialUndelete extends SpecialPage {
         */
        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(),
index de6f6c7..e5c55b8 100644 (file)
@@ -73,7 +73,7 @@ class UnusedtemplatesPage extends QueryPage {
                        array(),
                        array( 'target' => $title->getPrefixedText() )
                );
-               return $this->getLang()->specialList( $pageLink, $wlhLink );
+               return $this->getLanguage()->specialList( $pageLink, $wlhLink );
        }
 
        function getPageHeader() {
index 9754b75..22c6485 100644 (file)
@@ -83,6 +83,6 @@ class UnwatchedpagesPage extends QueryPage {
                        array( 'action' => 'watch', 'token' => $token )
                );
 
-               return $this->getLang()->specialList( $plink, $wlink );
+               return $this->getLanguage()->specialList( $plink, $wlink );
        }
 }
index 2331314..3cb368c 100644 (file)
@@ -569,11 +569,11 @@ class SpecialUpload extends SpecialPage {
                        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
@@ -844,7 +844,7 @@ class UploadForm extends HTMLForm {
                        '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',
                );
@@ -859,7 +859,7 @@ class UploadForm extends HTMLForm {
                                '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',
                        );
@@ -891,16 +891,16 @@ class UploadForm extends HTMLForm {
                                # 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 {
index 2255fc1..ed51332 100644 (file)
@@ -1232,7 +1232,7 @@ class LoginForm extends SpecialPage {
                                }
                        }
                        return count( $links ) > 0 ? $this->msg( 'loginlanguagelabel' )->rawParams(
-                               $this->getLang()->pipeList( $links ) )->escaped() : '';
+                               $this->getLanguage()->pipeList( $links ) )->escaped() : '';
                } else {
                        return '';
                }
index 9f5f922..100d5c1 100644 (file)
@@ -421,12 +421,12 @@ class UserrightsPage extends SpecialPage {
                $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(
index 4a2b8fb..bb17772 100644 (file)
@@ -362,7 +362,7 @@ class SpecialVersion extends SpecialPage {
                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;
                }
@@ -546,7 +546,7 @@ class SpecialVersion extends SpecialPage {
                        if ( $sort ) {
                                sort( $list );
                        }
-                       return $this->getLang()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
+                       return $this->getLanguage()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
                }
        }
 
index 212bd5b..33e789d 100644 (file)
@@ -69,7 +69,7 @@ class WantedCategoriesPage extends WantedQueryPage {
                                array( 'broken' )
                        );
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
                        $lang->formatNum( $result->value ) );
                return $lang->specialList( $plink, $nlinks );
index 3e4bdd9..94ab6b5 100644 (file)
@@ -240,7 +240,7 @@ class SpecialWatchlist extends SpecialPage {
                        $output->showLagWarning( $lag );
                }
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                # Create output form
                $form  = Xml::fieldset( wfMsg( 'watchlist-options' ), false, array( 'id' => 'mw-watchlist-options' ) );
@@ -419,7 +419,7 @@ class SpecialWatchlist extends SpecialPage {
 
                return Linker::linkKnown(
                        $this->getTitle(),
-                       $this->getLang()->formatNum( $h ),
+                       $this->getLanguage()->formatNum( $h ),
                        array(),
                        $options
                );
@@ -427,7 +427,7 @@ class SpecialWatchlist extends SpecialPage {
 
        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(),
@@ -455,8 +455,8 @@ class SpecialWatchlist extends SpecialPage {
                }
                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 ) );
        }
 
index 82ad7df..e55374e 100644 (file)
@@ -278,7 +278,7 @@ class SpecialWhatLinksHere extends SpecialPage {
        }
 
        protected function listItem( $row, $nt, $notClose = false ) {
-               $dirmark = $this->getLang()->getDirMark();
+               $dirmark = $this->getLanguage()->getDirMark();
 
                # local message cache
                static $msgcache = null;
@@ -371,7 +371,7 @@ class SpecialWhatLinksHere extends SpecialPage {
                }
 
                $limitLinks = array();
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
                foreach ( $this->limits as $limit ) {
                        $prettyLimit = htmlspecialchars( $lang->formatNum( $limit ) );
                        $overrides = array( 'limit' => $limit );
@@ -451,6 +451,6 @@ class SpecialWhatLinksHere extends SpecialPage {
                        $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 ) );
        }
 }
index 4b6fbe1..37fdab1 100644 (file)
@@ -112,7 +112,7 @@ class CologneBlueTemplate extends LegacyTemplate {
                $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,
@@ -189,7 +189,7 @@ class CologneBlueTemplate extends LegacyTemplate {
                        );
                }
 
-               return $this->getSkin()->getLang()->pipeList( $s );
+               return $this->getSkin()->getLanguage()->pipeList( $s );
        }
 
        /**
index 7db8a68..bd0c41a 100644 (file)
@@ -66,11 +66,11 @@ class StandardTemplate extends LegacyTemplate {
 
                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' ),
index bce481b..d9acf6a 100644 (file)
@@ -182,7 +182,7 @@ class ParserTest {
                // $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();
@@ -695,7 +695,7 @@ class ParserTest {
                $GLOBALS['wgMemc'] = new EmptyBagOStuff;
 
                $context = new RequestContext();
-               $GLOBALS['wgLang'] = $context->getLang();
+               $GLOBALS['wgLang'] = $context->getLanguage();
                $GLOBALS['wgOut'] = $context->getOutput();
 
                $GLOBALS['wgUser'] = new User();
index b255bf0..37a0486 100644 (file)
@@ -79,7 +79,7 @@ class NewParserTest extends MediaWikiTestCase {
                // $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();
@@ -309,7 +309,7 @@ class NewParserTest extends MediaWikiTestCase {
                $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();
index f6f2fbd..c9f413e 100644 (file)
@@ -49,7 +49,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                // $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();