* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appro...
authorRobin Pepermans <robin@users.mediawiki.org>
Tue, 21 Jun 2011 10:14:34 +0000 (10:14 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Tue, 21 Jun 2011 10:14:34 +0000 (10:14 +0000)
* Remove $wgContLang in SpecialVersion per r90302

12 files changed:
includes/GlobalFunctions.php
includes/LogEventsList.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDisambiguations.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialListredirects.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialVersion.php

index 7069431..2871676 100644 (file)
@@ -2522,8 +2522,7 @@ function in_string( $needle, $str, $insensitive = false ) {
 }
 
 function wfSpecialList( $page, $details ) {
-       global $wgContLang;
-       $details = $details ? ' ' . $wgContLang->getDirMark() . "($details)" : '';
+       $details = $details ? ' ' . wfUILang()->getDirMark() . "($details)" : '';
        return $page . $details;
 }
 
index f488f31..d759017 100644 (file)
@@ -364,12 +364,11 @@ class LogEventsList {
        }
 
        private function logComment( $row ) {
-               global $wgContLang;
                if( self::isDeleted( $row, LogPage::DELETED_COMMENT ) ) {
                        $comment = '<span class="history-deleted">' .
                                wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
                } else {
-                       $comment = $wgContLang->getDirMark() .
+                       $comment = wfUILang()->getDirMark() .
                                $this->skin->commentBlock( $row->log_comment );
                }
                return $comment;
index 7c87a99..1ea25ae 100644 (file)
@@ -77,7 +77,7 @@ class BrokenRedirectsPage extends PageQueryPage {
         * @return String
         */
        function formatResult( $skin, $result ) {
-               global $wgUser, $wgContLang, $wgLang;
+               global $wgUser, $wgLang;
 
                $fromObj = Title::makeTitle( $result->namespace, $result->title );
                if ( isset( $result->rd_title ) ) {
@@ -116,7 +116,7 @@ class BrokenRedirectsPage extends PageQueryPage {
                        array(),
                        array( 'broken' )
                );
-               $arr = $wgContLang->getArrow();
+               $arr = wfUILang()->getArrow();
 
                $out = $from . wfMsg( 'word-separator' );
 
index aba43b4..0497f8f 100644 (file)
@@ -543,7 +543,7 @@ class ContribsPager extends ReverseChronologicalPager {
         * @todo This would probably look a lot nicer in a table.
         */
        function formatRow( $row ) {
-               global $wgUser, $wgLang, $wgContLang;
+               global $wgUser, $wgLang;
                wfProfileIn( __METHOD__ );
 
                $sk = $this->getSkin();
@@ -590,7 +590,7 @@ class ContribsPager extends ReverseChronologicalPager {
                        array( 'action' => 'history' )
                );
 
-               $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
+               $comment = wfUILang()->getDirMark() . $sk->revComment( $rev, false, true );
                $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
                if( $rev->userCan( Revision::DELETED_TEXT ) ) {
                        $d = $sk->linkKnown(
index e62253b..bcea5d4 100644 (file)
@@ -122,14 +122,13 @@ class DisambiguationsPage extends PageQueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
                $title = Title::newFromID( $result->value );
                $dp = Title::makeTitle( $result->namespace, $result->title );
 
                $from = $skin->link( $title );
                $edit = $skin->link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) ,
                        array(), array( 'redirect' => 'no', 'action' => 'edit' ) );
-               $arr  = $wgContLang->getArrow();
+               $arr  = wfUILang()->getArrow();
                $to   = $skin->link( $dp );
 
                return "$from $edit $arr $to";
index 4242a0a..56d5ded 100644 (file)
@@ -76,8 +76,6 @@ class DoubleRedirectsPage extends PageQueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
-
                $titleA = Title::makeTitle( $result->namespace, $result->title );
 
                if ( $result && !isset( $result->nsb ) ) {
@@ -119,7 +117,7 @@ class DoubleRedirectsPage extends PageQueryPage {
                        array( 'redirect' => 'no' )
                );
                $linkC = $skin->linkKnown( $titleC );
-               $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
+               $arr = wfUILang()->getArrow() . wfUILang()->getDirMark();
 
                return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
        }
index 4009fe6..93d2f55 100644 (file)
@@ -91,7 +91,7 @@ class FileDuplicateSearchPage extends QueryPage {
        }
 
        function execute( $par ) {
-               global $wgRequest, $wgOut, $wgLang, $wgContLang, $wgScript;
+               global $wgRequest, $wgOut, $wgLang, $wgScript;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -126,7 +126,7 @@ class FileDuplicateSearchPage extends QueryPage {
                }
 
                if( $this->hash != '' ) {
-                       $align = $wgContLang->alignEnd();
+                       $align = wfUILang()->alignEnd();
 
                        # Show a thumbnail of the file
                        $img = $this->file;
index bb47c7b..8552717 100644 (file)
@@ -96,8 +96,6 @@ class ListredirectsPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
-
                # Make a link to the redirect itself
                $rd_title = Title::makeTitle( $result->namespace, $result->title );
                $rd_link = $skin->link(
@@ -111,7 +109,7 @@ class ListredirectsPage extends QueryPage {
                $target = $this->getRedirectTarget( $result );
                if( $target ) {
                        # Make a link to the destination page
-                       $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
+                       $arr = wfUILang()->getArrow() . wfUILang()->getDirMark();
                        $targetLink = $skin->link( $target );
                        return "$rd_link $arr $targetLink";
                } else {
index a0825b3..7b96222 100644 (file)
@@ -289,7 +289,7 @@ class SpecialNewpages extends IncludableSpecialPage {
         * @return String
         */
        public function formatRow( $result ) {
-               global $wgLang, $wgContLang;
+               global $wgLang;
 
                # Revision deletion works on revisions, so we should cast one
                $row = array(
@@ -302,7 +302,7 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                $classes = array();
 
-               $dm = $wgContLang->getDirMark();
+               $dm = wfUILang()->getDirMark();
 
                $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
                $time = Html::element( 'span', array( 'class' => 'mw-newpages-time' ),
index 32b4c87..68e58db 100644 (file)
@@ -76,7 +76,7 @@ class SpecialProtectedpages extends SpecialPage {
         * @return string Formatted <li> element
         */
        public function formatRow( $row ) {
-               global $wgUser, $wgLang, $wgContLang;
+               global $wgUser, $wgLang;
 
                wfProfileIn( __METHOD__ );
 
@@ -116,7 +116,7 @@ class SpecialProtectedpages extends SpecialPage {
                }
 
                if(!is_null($size = $row->page_len)) {
-                       $stxt = $wgContLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
+                       $stxt = wfUILang()->getDirMark() . ' ' . $skin->formatRevisionSize( $size );
                }
 
                # Show a link to the change protection form for allowed users otherwise a link to the protection log
index 5a487fc..1f71843 100644 (file)
@@ -86,8 +86,8 @@ class ShortPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang, $wgContLang;
-               $dm = $wgContLang->getDirMark();
+               global $wgLang;
+               $dm = wfUILang()->getDirMark();
 
                $title = Title::makeTitle( $result->namespace, $result->title );
                if ( !$title ) {
index c5d1411..c579fbd 100644 (file)
@@ -49,7 +49,7 @@ class SpecialVersion extends SpecialPage {
         * main()
         */
        public function execute( $par ) {
-               global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
+               global $wgOut, $wgSpecialVersionShowHooks, $wgRequest;
 
                $this->setHeaders();
                $this->outputHeader();