Second batch of files modified to replace selected wgLang with wgContLang
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Fri, 24 Sep 2004 16:24:43 +0000 (16:24 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Fri, 24 Sep 2004 16:24:43 +0000 (16:24 +0000)
21 files changed:
includes/SearchEngine.php
includes/SearchUpdate.php
includes/Skin.php
includes/SkinPHPTal.php
includes/SpecialAllpages.php
includes/SpecialAsksql.php
includes/SpecialBooksources.php
includes/SpecialBrokenRedirects.php
includes/SpecialContributions.php
includes/SpecialDisambiguations.php
includes/SpecialDoubleRedirects.php
includes/SpecialExport.php
includes/SpecialImagelist.php
includes/SpecialImport.php
includes/SpecialIpblocklist.php
includes/SpecialListusers.php
includes/SpecialLog.php
includes/SpecialMaintenance.php
includes/SpecialNewimages.php
includes/SpecialNewpages.php
includes/SpecialPreferences.php

index 239469a..a04c3ea 100644 (file)
@@ -83,7 +83,7 @@ class SearchEngine {
         * that is done by showResults()
         */
        function powersearch() {
-               global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
+               global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
                $sk =& $wgUser->getSkin();
                
                $search                 = $this->rawText;
@@ -98,7 +98,7 @@ class SearchEngine {
                }
                
                # Do namespace checkboxes
-               $namespaces = $wgLang->getNamespaces();
+               $namespaces = $wgContLang->getNamespaces();
                foreach ( $namespaces as $i => $namespace ) {
                        # Skip virtual namespaces
                        if ( $i < 0 ) {
@@ -260,7 +260,7 @@ class SearchEngine {
        }
        
        function parseQuery3() {
-               global $wgDBminWordLen, $wgLang;
+               global $wgDBminWordLen, $wgContLang;
 
                # on non mysql4 database: get list of words we don't want to search for
                require_once( 'FulltextStoplist.php' );
@@ -272,7 +272,7 @@ class SearchEngine {
 
                $last = $cond = '';
                foreach ( $w as $word ) {
-                       $word = $wgLang->stripForSearch( $word );
+                       $word = $wgContLang->stripForSearch( $word );
                        if ( 'and' == $word || 'or' == $word || 'not' == $word
                          || '(' == $word || ')' == $word ) {
                                $cond .= ' ' . strtoupper( $word );
@@ -303,7 +303,7 @@ class SearchEngine {
        }
        
        function parseQuery4() {
-               global $wgLang;
+               global $wgContLang;
                $lc = SearchEngine::legalSearchChars();
                $searchon = '';
                $this->searchTerms = array();
@@ -316,7 +316,7 @@ class SearchEngine {
                                if( $this->strictMatching && ($terms[1] == '') ) {
                                        $terms[1] = '+';
                                }
-                               $searchon .= $terms[1] . $wgLang->stripForSearch( $terms[2] );
+                               $searchon .= $terms[1] . $wgContLang->stripForSearch( $terms[2] );
                                if( !empty( $terms[3] ) ) {
                                        $regexp = preg_quote( $terms[3] );
                                        if( $terms[4] ) $regexp .= "[0-9A-Za-z_]+";
@@ -379,7 +379,7 @@ class SearchEngine {
        }
 
        function showHit( $row ) {
-               global $wgUser, $wgOut, $wgLang;
+               global $wgUser, $wgOut, $wgContLang;
 
                $t = Title::makeName( $row->cur_namespace, $row->cur_title );
                if( is_null( $t ) ) {
@@ -411,12 +411,12 @@ class SearchEngine {
                                continue;
                        }
 
-                       $pre = $wgLang->truncate( $m[1], -$contextchars, '...' );
+                       $pre = $wgContLang->truncate( $m[1], -$contextchars, '...' );
 
                        if ( count( $m ) < 3 ) {
                                $post = '';
                        } else {
-                               $post = $wgLang->truncate( $m[3], $contextchars, '...' );
+                               $post = $wgContLang->truncate( $m[3], $contextchars, '...' );
                        }
 
                        $found = $m[2];
@@ -524,7 +524,7 @@ class SearchEngine {
         * @static
         */
        function doFuzzyTitleSearch( $search, $namespace ){
-               global $wgLang, $wgOut;
+               global $wgContLang, $wgOut;
                
                $this->setupPage();
                
@@ -536,7 +536,7 @@ class SearchEngine {
                $wikitext = '';
                foreach($fuzzymatches as $res){
                        $t = str_replace('_', ' ', $res[1]);
-                       $tfull = $wgLang->getNsText( $namespace ) . ":$t|$t";
+                       $tfull = $wgContLang->getNsText( $namespace ) . ":$t|$t";
                        if( $namespace == NS_MAIN )
                                $tfull = $t;
                        $distance = $res[0];
@@ -547,7 +547,7 @@ class SearchEngine {
                }
                if( $wikitext ){
                        if( $namespace != NS_MAIN )
-                               $wikitext = '=== ' . $wgLang->getNsText( $namespace ) . " ===\n" . $wikitext;
+                               $wikitext = '=== ' . $wgContLang->getNsText( $namespace ) . " ===\n" . $wikitext;
                        $wgOut->addWikiText( $wikitext );
                        return true;
                }
index 3f268b8..d1d367a 100644 (file)
@@ -30,7 +30,7 @@ class SearchUpdate {
        }
 
        function doUpdate() {
-               global $wgDBminWordLen, $wgLang, $wgDisableSearchUpdate;
+               global $wgDBminWordLen, $wgContLang, $wgDisableSearchUpdate;
 
                if( $wgDisableSearchUpdate || !$this->mId ) {
                        return false;
@@ -55,7 +55,7 @@ class SearchUpdate {
                }
 
                # Language-specific strip/conversion
-               $text = $wgLang->stripForSearch( $this->mText );
+               $text = $wgContLang->stripForSearch( $this->mText );
 
                wfProfileIn( $fname.'-regexps' );
                $text = preg_replace( "/<\\/?\\s*[A-Za-z][A-Za-z0-9]*\\s*([^>]*?)>/",
index 87c23d7..65677c1 100644 (file)
@@ -212,10 +212,10 @@ class Skin {
        }
 
        function getHeadScripts() {
-               global $wgStylePath, $wgUser, $wgLang, $wgAllowUserJs;
+               global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs;
                $r = "<script type=\"text/javascript\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n";
                if( $wgAllowUserJs && $wgUser->getID() != 0 ) { # logged in
-                       $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+                       $userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
                        $userjs = htmlspecialchars($this->makeUrl($userpage.'/'.$this->getSkinName().'.js', 'action=raw&ctype=text/javascript'));
                        $r .= '<script type="text/javascript" src="'.$userjs."\"></script>\n";
                }
@@ -224,16 +224,16 @@ class Skin {
 
        # get the user/site-specific stylesheet, SkinPHPTal called from RawPage.php (settings are cached that way)
        function getUserStylesheet() {
-               global $wgOut, $wgStylePath, $wgLang, $wgUser, $wgRequest, $wgTitle, $wgAllowUserCss;
+               global $wgOut, $wgStylePath, $wgContLang, $wgUser, $wgRequest, $wgTitle, $wgAllowUserCss;
                $sheet = $this->getStylesheet();
                $action = $wgRequest->getText('action');
                $s = "@import \"$wgStylePath/$sheet\";\n";
-               if($wgLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
+               if($wgContLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
                if( $wgAllowUserCss && $wgUser->getID() != 0 ) { # logged in
                        if($wgTitle->isCssSubpage() and $action == 'submit' and  $wgTitle->userCanEditCssJsSubpage()) {
                                $s .= $wgRequest->getText('wpTextbox1');
                        } else {
-                               $userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+                               $userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
                                $s.= '@import "'.$this->makeUrl($userpage.'/'.$this->getSkinName().'.css', 'action=raw&ctype=text/css').'";'."\n";
                        }
                }
@@ -263,9 +263,9 @@ class Skin {
         * Some styles that are set by user through the user settings interface.
         */
        function doGetUserStyles() {
-               global $wgUser, $wgLang;
+               global $wgUser, $wgContLang;
 
-               $csspage = $wgLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css';
+               $csspage = $wgContLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css';
                $s = '@import "'.$this->makeUrl($csspage, 'action=raw&ctype=text/css')."\";\n";
 
                if ( 1 == $wgUser->getOption( 'underline' ) ) {
@@ -313,11 +313,11 @@ class Skin {
        }
 
        function getExternalLinkAttributes( $link, $text, $class='' ) {
-               global $wgUser, $wgOut, $wgLang;
+               global $wgUser, $wgOut, $wgContLang;
 
                $same = ($link == $text);
                $link = urldecode( $link );
-               $link = $wgLang->checkTitleEncoding( $link );
+               $link = $wgContLang->checkTitleEncoding( $link );
                $link = str_replace( '_', ' ', $link );
                $link = htmlspecialchars( $link );
 
@@ -389,7 +389,7 @@ class Skin {
        }
 
        function doBeforeContent() {
-               global $wgUser, $wgOut, $wgTitle, $wgLang, $wgSiteNotice;
+               global $wgUser, $wgOut, $wgTitle, $wgContLang, $wgSiteNotice;
                $fname = 'Skin::doBeforeContent';
                wfProfileIn( $fname );
 
@@ -410,7 +410,7 @@ class Skin {
 
                $shove = ($qb != 0);
                $left = ($qb == 1 || $qb == 3);
-               if($wgLang->isRTL()) $left = !$left;
+               if($wgContLang->isRTL()) $left = !$left;
 
                if ( !$shove ) {
                        $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
@@ -418,13 +418,13 @@ class Skin {
                } elseif( $left ) {
                        $s .= $this->getQuickbarCompensator( $rows );
                }
-               $l = $wgLang->isRTL() ? 'right' : 'left';
+               $l = $wgContLang->isRTL() ? 'right' : 'left';
                $s .= "<td {$borderhack} align='$l' valign='top'>\n";
 
                $s .= $this->topLinks() ;
                $s .= "<p class='subtitle'>" . $this->pageTitleLinks() . "</p>\n";
 
-               $r = $wgLang->isRTL() ? "left" : "right";
+               $r = $wgContLang->isRTL() ? "left" : "right";
                $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
                $s .= $this->nameAndLogin();
                $s .= "\n<br />" . $this->searchForm() . "</td>";
@@ -532,7 +532,7 @@ class Skin {
        }
 
        function doAfterContent() {
-               global $wgUser, $wgOut, $wgLang;
+               global $wgUser, $wgOut, $wgContLang;
                $fname =  'Skin::doAfterContent';
                wfProfileIn( $fname );
                wfProfileIn( $fname.'-1' );
@@ -547,14 +547,14 @@ class Skin {
                $qb = $this->qbSetting();
                $shove = ($qb != 0);
                $left = ($qb == 1 || $qb == 3);
-               if($wgLang->isRTL()) $left = !$left;
+               if($wgContLang->isRTL()) $left = !$left;
 
                if ( $shove && $left ) { # Left
                        $s .= $this->getQuickbarCompensator();
                }
                wfProfileOut( $fname.'-2' );
                wfProfileIn( $fname.'-3' );
-               $l = $wgLang->isRTL() ? 'right' : 'left';
+               $l = $wgContLang->isRTL() ? 'right' : 'left';
                $s .= "<td class='bottom' align='$l' valign='top'>";
 
                $s .= $this->bottomLinks();
@@ -579,7 +579,7 @@ class Skin {
        }
 
        function pageTitleLinks() {
-               global $wgOut, $wgTitle, $wgUser, $wgLang, $wgUseApproval, $wgRequest;
+               global $wgOut, $wgTitle, $wgUser, $wgContLang, $wgUseApproval, $wgRequest;
 
                extract( $wgRequest->getValues( 'oldid', 'diff' ) );
                $action = $wgRequest->getText( 'action' );
@@ -617,7 +617,7 @@ class Skin {
                        if(!(strcmp($wgTitle->getText(),$wgUser->getName()) == 0 &&
                                                $wgTitle->getNamespace()==Namespace::getTalk(Namespace::getUser()))) {
                                $n =$wgUser->getName();
-                               $tl = $this->makeKnownLink( $wgLang->getNsText(
+                               $tl = $this->makeKnownLink( $wgContLang->getNsText(
                                                        Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
                                                wfMsg('newmessageslink') );
                                $s.= ' | <strong>'. wfMsg( 'newmessages', $tl ) . '</strong>';
@@ -634,13 +634,13 @@ class Skin {
        }
 
        function getUndeleteLink() {
-               global $wgUser, $wgTitle, $wgLang, $action;
+               global $wgUser, $wgTitle, $wgContLang, $action;
                if( $wgUser->isSysop() &&
                        (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
                        ($n = $wgTitle->isDeleted() ) ) {
                        return wfMsg( 'thisisdeleted',
                                $this->makeKnownLink(
-                                       $wgLang->SpecialPage( 'Undelete/' . $wgTitle->getPrefixedDBkey() ),
+                                       $wgContLang->SpecialPage( 'Undelete/' . $wgTitle->getPrefixedDBkey() ),
                                        wfMsg( 'restorelink', $n ) ) );
                }
                return '';
@@ -720,19 +720,19 @@ class Skin {
        }
 
        function nameAndLogin() {
-               global $wgUser, $wgTitle, $wgLang, $wgShowIPinHeader, $wgIP;
+               global $wgUser, $wgTitle, $wgLang, $wgContLang, $wgShowIPinHeader, $wgIP;
 
-               $li = $wgLang->specialPage( 'Userlogin' );
-               $lo = $wgLang->specialPage( 'Userlogout' );
+               $li = $wgContLang->specialPage( 'Userlogin' );
+               $lo = $wgContLang->specialPage( 'Userlogout' );
 
                $s = '';
                if ( 0 == $wgUser->getID() ) {
                        if( $wgShowIPinHeader && isset(  $_COOKIE[ini_get('session.name')] ) ) {
                                $n = $wgIP;
 
-                               $tl = $this->makeKnownLink( $wgLang->getNsText(
+                               $tl = $this->makeKnownLink( $wgContLang->getNsText(
                                  Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
-                                 $wgLang->getNsText( Namespace::getTalk( 0 ) ) );
+                                 $wgContLang->getNsText( Namespace::getTalk( 0 ) ) );
 
                                $s .= $n . ' ('.$tl.')';
                        } else {
@@ -749,13 +749,13 @@ class Skin {
                } else {
                        $n = $wgUser->getName();
                        $rt = $wgTitle->getPrefixedURL();
-                       $tl = $this->makeKnownLink( $wgLang->getNsText(
+                       $tl = $this->makeKnownLink( $wgContLang->getNsText(
                          Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}",
-                         $wgLang->getNsText( Namespace::getTalk( 0 ) ) );
+                         $wgContLang->getNsText( Namespace::getTalk( 0 ) ) );
 
                        $tl = " ({$tl})";
 
-                       $s .= $this->makeKnownLink( $wgLang->getNsText(
+                       $s .= $this->makeKnownLink( $wgContLang->getNsText(
                          Namespace::getUser() ) . ":{$n}", $n ) . "{$tl}<br />" .
                          $this->makeKnownLink( $lo, wfMsg( 'logout' ),
                          "returnto={$rt}" ) . ' | ' .
@@ -957,7 +957,7 @@ class Skin {
        }
 
        function quickBar() {
-               global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgLang;
+               global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgContLang;
                global $wgDisableUploads, $wgRemoteUploads;
 
                $fname =  'Skin::quickBar';
@@ -976,7 +976,7 @@ class Skin {
                  . $sep . $this->specialLink( 'randompage' );
                if ($wgUser->getID()) {
                $s.= $sep . $this->specialLink( 'watchlist' ) ;
-               $s .= $sep .$this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+               $s .= $sep .$this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
                  wfMsg( 'mycontris' ), 'target=' . wfUrlencode($wgUser->getName() ) );
 
                }
@@ -1019,7 +1019,7 @@ class Skin {
                                        }
 
                                        $link = $wgTitle->getText();
-                                       if ($nstext = $wgLang->getNsText($tns) ) { # add namespace if necessary
+                                       if ($nstext = $wgContLang->getNsText($tns) ) { # add namespace if necessary
                                                $link = $nstext . ':' . $link ;
                                        }
 
@@ -1102,7 +1102,7 @@ class Skin {
        }
 
        function specialPagesList() {
-               global $wgUser, $wgOut, $wgLang, $wgServer, $wgRedirectScript;
+               global $wgUser, $wgOut, $wgContLang, $wgServer, $wgRedirectScript;
                require_once('SpecialPage.php');
                $a = array();
                $pages = SpecialPage::getPages();
@@ -1124,7 +1124,7 @@ class Skin {
                }
                $go = wfMsg( 'go' );
                $sp = wfMsg( 'specialpages' );
-               $spp = $wgLang->specialPage( 'Specialpages' );
+               $spp = $wgContLang->specialPage( 'Specialpages' );
 
                $s = '<form id="specialpages" method="get" class="inline" ' .
                  'action="' . htmlspecialchars( "{$wgServer}{$wgRedirectScript}" ) . "\">\n";
@@ -1132,7 +1132,7 @@ class Skin {
                $s .= "<option value=\"{$spp}\">{$sp}</option>\n";
 
                foreach ( $a as $name => $desc ) {
-                       $p = $wgLang->specialPage( $name );
+                       $p = $wgContLang->specialPage( $name );
                        $s .= "<option value=\"{$p}\">{$desc}</option>\n";
                }
                $s .= "</select>\n";
@@ -1251,10 +1251,10 @@ class Skin {
        }
 
        function moveThisPage() {
-               global $wgTitle, $wgLang;
+               global $wgTitle, $wgContLang;
 
                if ( $wgTitle->userCanEdit() ) {
-                       $s = $this->makeKnownLink( $wgLang->specialPage( 'Movepage' ),
+                       $s = $this->makeKnownLink( $wgContLang->specialPage( 'Movepage' ),
                          wfMsg( 'movethispage' ), 'target=' . $wgTitle->getPrefixedURL() );
                } // no message if page is protected - would be redundant
                return $s;
@@ -1269,36 +1269,36 @@ class Skin {
        }
 
        function whatLinksHere() {
-               global $wgTitle, $wgLang;
+               global $wgTitle, $wgContLang;
 
-               $s = $this->makeKnownLink( $wgLang->specialPage( 'Whatlinkshere' ),
+               $s = $this->makeKnownLink( $wgContLang->specialPage( 'Whatlinkshere' ),
                  wfMsg( 'whatlinkshere' ), 'target=' . $wgTitle->getPrefixedURL() );
                return $s;
        }
 
        function userContribsLink() {
-               global $wgTitle, $wgLang;
+               global $wgTitle, $wgContLang;
 
-               $s = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+               $s = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
                  wfMsg( 'contributions' ), 'target=' . $wgTitle->getPartialURL() );
                return $s;
        }
 
        function emailUserLink() {
-               global $wgTitle, $wgLang;
+               global $wgTitle, $wgContLang;
 
-               $s = $this->makeKnownLink( $wgLang->specialPage( 'Emailuser' ),
+               $s = $this->makeKnownLink( $wgContLang->specialPage( 'Emailuser' ),
                  wfMsg( 'emailuser' ), 'target=' . $wgTitle->getPartialURL() );
                return $s;
        }
 
        function watchPageLinksLink() {
-               global $wgOut, $wgTitle, $wgLang;
+               global $wgOut, $wgTitle, $wgContLang;
 
                if ( ! $wgOut->isArticleRelated() ) {
                        $s = '(' . wfMsg( 'notanarticle' ) . ')';
                } else {
-                       $s = $this->makeKnownLink( $wgLang->specialPage(
+                       $s = $this->makeKnownLink( $wgContLang->specialPage(
                          'Recentchangeslinked' ), wfMsg( 'recentchangeslinked' ),
                          'target=' . $wgTitle->getPrefixedURL() );
                }
@@ -1306,45 +1306,45 @@ class Skin {
        }
 
        function otherLanguages() {
-               global $wgOut, $wgLang, $wgTitle, $wgUseNewInterlanguage;
+               global $wgOut, $wgContLang, $wgTitle, $wgUseNewInterlanguage;
 
                $a = $wgOut->getLanguageLinks();
                if ( 0 == count( $a ) ) {
                        if ( !$wgUseNewInterlanguage ) return '';
-                       $ns = $wgLang->getNsIndex ( $wgTitle->getNamespace () ) ;
+                       $ns = $wgContLang->getNsIndex ( $wgTitle->getNamespace () ) ;
                        if ( $ns != 0 AND $ns != 1 ) return '' ;
                        $pn = 'Intl' ;
                        $x = 'mode=addlink&xt='.$wgTitle->getDBkey() ;
-                       return $this->makeKnownLink( $wgLang->specialPage( $pn ),
+                       return $this->makeKnownLink( $wgContLang->specialPage( $pn ),
                                  wfMsg( 'intl' ) , $x );
                        }
 
                if ( !$wgUseNewInterlanguage ) {
                        $s = wfMsg( 'otherlanguages' ) . ': ';
                } else {
-                       global $wgLanguageCode ;
+                       global $wgContLanguageCode ;
                        $x = 'mode=zoom&xt='.$wgTitle->getDBkey() ;
-                       $x .= '&xl='.$wgLanguageCode ;
-                       $s =  $this->makeKnownLink( $wgLang->specialPage( 'Intl' ),
+                       $x .= '&xl='.$wgContLanguageCode ;
+                       $s =  $this->makeKnownLink( $wgContLang->specialPage( 'Intl' ),
                                  wfMsg( 'otherlanguages' ) , $x ) . ': ' ;
                        }
 
                $s = wfMsg( 'otherlanguages' ) . ': ';
                $first = true;
-               if($wgLang->isRTL()) $s .= '<span dir="LTR">';
+               if($wgContLang->isRTL()) $s .= '<span dir="LTR">';
                foreach( $a as $l ) {
                        if ( ! $first ) { $s .= ' | '; }
                        $first = false;
 
                        $nt = Title::newFromText( $l );
                        $url = $nt->getFullURL();
-                       $text = $wgLang->getLanguageName( $nt->getInterwiki() );
+                       $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
 
                        if ( '' == $text ) { $text = $l; }
                        $style = $this->getExternalLinkAttributes( $l, $text );
                        $s .= "<a href=\"{$url}\"{$style}>{$text}</a>";
                }
-               if($wgLang->isRTL()) $s .= '</span>';
+               if($wgContLang->isRTL()) $s .= '</span>';
                return $s;
        }
 
@@ -1383,7 +1383,7 @@ class Skin {
        }
 
        function talkLink() {
-               global $wgLang, $wgTitle, $wgLinkCache;
+               global $wgContLang, $wgTitle, $wgLinkCache;
 
                $tns = $wgTitle->getNamespace();
                if ( -1 == $tns ) { return ''; }
@@ -1413,7 +1413,7 @@ class Skin {
                        $lns = Namespace::getTalk( $tns );
                        $text=$tp;
                }
-               $n = $wgLang->getNsText( $lns );
+               $n = $wgContLang->getNsText( $lns );
                if ( '' == $n ) { $link = $pn; }
                else { $link = $n.':'.$pn; }
 
@@ -1425,7 +1425,7 @@ class Skin {
        }
 
        function commentLink() {
-               global $wgLang, $wgTitle, $wgLinkCache;
+               global $wgContLang, $wgTitle, $wgLinkCache;
 
                $tns = $wgTitle->getNamespace();
                if ( -1 == $tns ) { return ''; }
@@ -1434,7 +1434,7 @@ class Skin {
 
                # assert Namespace::isTalk( $lns )
 
-               $n = $wgLang->getNsText( $lns );
+               $n = $wgContLang->getNsText( $lns );
                $pn = $wgTitle->getText();
 
                $link = $n.':'.$pn;
@@ -1832,7 +1832,7 @@ class Skin {
        }
 
        function makeImageLinkObj( $nt, $alt = '' ) {
-               global $wgLang, $wgUseImageResize;
+               global $wgContLang, $wgUseImageResize;
                $img   = Image::newFromTitle( $nt );
                $url   = $img->getURL();
 
@@ -1914,7 +1914,7 @@ class Skin {
                                # If  thumbnail width has not been provided, it is set
                                # here to 180 pixels
                                if ( $align == '' ) {
-                                       $align = $wgLang->isRTL() ? 'left' : 'right';
+                                       $align = $wgContLang->isRTL() ? 'left' : 'right';
                                }
                                if ( ! isset($width) ) {
                                        $width = 180;
@@ -1961,7 +1961,7 @@ class Skin {
         * $img is an Image object
         */
        function makeThumbLinkObj( $img, $label = '', $align = 'right', $boxwidth = 180, $boxheight=false, $framed=false , $manual_thumb = "" ) {
-               global $wgStylePath, $wgLang;
+               global $wgStylePath, $wgContLang;
                # $image = Title::makeTitleSafe( NS_IMAGE, $name );
                $url  = $img->getURL();
 
@@ -2020,8 +2020,8 @@ class Skin {
                $u = $img->getEscapeLocalURL();
 
                $more = htmlspecialchars( wfMsg( 'thumbnail-more' ) );
-               $magnifyalign = $wgLang->isRTL() ? 'left' : 'right';
-               $textalign = $wgLang->isRTL() ? ' style="text-align:right"' : '';
+               $magnifyalign = $wgContLang->isRTL() ? 'left' : 'right';
+               $textalign = $wgContLang->isRTL() ? ' style="text-align:right"' : '';
 
                $s = "<div class=\"thumb t{$align}\"><div style=\"width:{$oboxwidth}px;\">";
                if ( $thumbUrl == '' ) {
@@ -2068,11 +2068,11 @@ class Skin {
        }
 
        function specialLink( $name, $key = '' ) {
-               global $wgLang;
+               global $wgContLang;
 
                if ( '' == $key ) { $key = strtolower( $name ); }
-               $pn = $wgLang->ucfirst( $name );
-               return $this->makeKnownLink( $wgLang->specialPage( $pn ),
+               $pn = $wgContLang->ucfirst( $name );
+               return $this->makeKnownLink( $wgContLang->specialPage( $pn ),
                  wfMsg( $key ) );
        }
 
@@ -2120,7 +2120,7 @@ class Skin {
         * Enhanced RC ungrouped line
         */
        function recentChangesBlockLine ( $rcObj ) {
-               global $wgStylePath, $wgLang ;
+               global $wgStylePath, $wgContLang ;
 
                # Get rc_xxxx variables
                extract( $rcObj->mAttribs ) ;
@@ -2175,7 +2175,7 @@ class Skin {
                # Comment
                 if ( $rc_comment != '' && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
                        $rc_comment=$this->formatComment($rc_comment, $rcObj->getTitle());
-                       $r .= $wgLang->emphasize( ' ('.$rc_comment.')' );
+                       $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' );
                }
 
                $r .= "<br />\n" ;
@@ -2186,7 +2186,7 @@ class Skin {
         * Enhanced RC group
         */
        function recentChangesBlockGroup ( $block ) {
-               global $wgStylePath, $wgLang ;
+               global $wgStylePath, $wgContLang ;
 
                $r = '' ;
                $M = wfMsg( 'minoreditletter' );
@@ -2219,7 +2219,7 @@ class Skin {
                $rcl = 'RCL'.$this->rcCacheIndex ;
                $rcm = 'RCM'.$this->rcCacheIndex ;
                $toggleLink = "javascript:toggleVisibility('$rci','$rcm','$rcl')" ;
-               $arrowdir = $wgLang->isRTL() ? 'l' : 'r';
+               $arrowdir = $wgContLang->isRTL() ? 'l' : 'r';
                $tl  = '<span id="'.$rcm.'"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_'.$arrowdir.'.png" width="12" height="12" /></a></span>' ;
                $tl .= '<span id="'.$rcl.'" style="display:none"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_d.png" width="12" height="12" /></a></span>' ;
                $r .= $tl ;
@@ -2291,7 +2291,7 @@ class Skin {
                        $r .= $rcObj->usertalklink ;
                        if ( $rc_comment != '' ) {
                                $rc_comment=$this->formatComment($rc_comment, $rcObj->getTitle());
-                               $r .= $wgLang->emphasize( ' ('.$rc_comment.')' ) ;
+                               $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' ) ;
                        }
                        $r .= "<br />\n" ;
                }
@@ -2335,18 +2335,19 @@ class Skin {
        }
 
        function recentChangesLineOld( &$rc, $watched = false ) {
-               global $wgTitle, $wgLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
+               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
 
                # Extract DB fields into local scope
                extract( $rc->mAttribs );
                $curIdEq = 'curid=' . $rc_cur_id;
 
                # Make date header if necessary
-               $date = $wgLang->date( $rc_timestamp, true);
+               $date = $wgContLang->date( $rc_timestamp, true);
+               $uidate = $wgLang->date( $rc_timestamp, true);
                $s = '';
                if ( $date != $this->lastdate ) {
                        if ( '' != $this->lastdate ) { $s .= "</ul>\n"; }
-                       $s .= "<h4>{$date}</h4>\n<ul class='special'>";
+                       $s .= "<h4>{$uidate}</h4>\n<ul class='special'>";
                        $this->lastdate = $date;
                        $this->rclistOpen = true;
                }
@@ -2415,26 +2416,26 @@ class Skin {
 
                # User link (or contributions for unregistered users)
                if ( 0 == $rc_user ) {
-                       $userLink = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+                       $userLink = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
                        $rc_user_text, 'target=' . $rc_user_text );
                } else {
-                       $userLink = $this->makeLink( $wgLang->getNsText( NS_USER ) . ':'.$rc_user_text, $rc_user_text );
+                       $userLink = $this->makeLink( $wgContLang->getNsText( NS_USER ) . ':'.$rc_user_text, $rc_user_text );
                }
                $s .= $userLink;
 
                # User talk link
-               $talkname=$wgLang->getNsText(NS_TALK); # use the shorter name
+               $talkname=$wgContLang->getNsText(NS_TALK); # use the shorter name
                global $wgDisableAnonTalk;
                if( 0 == $rc_user && $wgDisableAnonTalk ) {
                        $userTalkLink = '';
                } else {
-                       $utns=$wgLang->getNsText(NS_USER_TALK);
+                       $utns=$wgContLang->getNsText(NS_USER_TALK);
                        $userTalkLink= $this->makeLink($utns . ':'.$rc_user_text, $talkname );
                }
                # Block link
                $blockLink='';
                if ( ( 0 == $rc_user ) && $wgUser->isSysop() ) {
-                       $blockLink = $this->makeKnownLink( $wgLang->specialPage(
+                       $blockLink = $this->makeKnownLink( $wgContLang->specialPage(
                          'Blockip' ), wfMsg( 'blocklink' ), 'ip='.$rc_user_text );
 
                }
@@ -2447,7 +2448,7 @@ class Skin {
                # Add comment
                if ( '' != $rc_comment && '*' != $rc_comment && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
                        $rc_comment=$this->formatComment($rc_comment,$rc->getTitle());
-                       $s .= $wgLang->emphasize(' (' . $rc_comment . ')');
+                       $s .= $wgContLang->emphasize(' (' . $rc_comment . ')');
                }
                $s .= "</li>\n";
 
@@ -2455,7 +2456,7 @@ class Skin {
        }
 
        function recentChangesLineNew( &$baseRC, $watched = false ) {
-               global $wgTitle, $wgLang, $wgUser, $wgRCSeconds;
+               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds;
 
                # Create a specialised object
                $rc = RCCacheEntry::newFromParent( $baseRC ) ;
@@ -2465,13 +2466,14 @@ class Skin {
                $curIdEq = 'curid=' . $rc_cur_id;
 
                # If it's a new day, add the headline and flush the cache
-               $date = $wgLang->date( $rc_timestamp, true);
+               $date = $wgContLang->date( $rc_timestamp, true);
+               $uidate = $wgLang->date( $rc_timestamp, true);
                $ret = '';
                if ( $date != $this->lastdate ) {
                        # Process current cache
                        $ret = $this->recentChangesBlock () ;
                        $this->rc_cache = array() ;
-                       $ret .= "<h4>{$date}</h4>\n";
+                       $ret .= "<h4>{$uidate}</h4>\n";
                        $this->lastdate = $date;
                }
 
@@ -2489,7 +2491,7 @@ class Skin {
                        $clink = $this->makeKnownLinkObj( $rc->getTitle(), '' ) ;
                }
 
-               $time = $wgLang->time( $rc_timestamp, true, $wgRCSeconds );
+               $time = $wgContLang->time( $rc_timestamp, true, $wgRCSeconds );
                $rc->watched = $watched ;
                $rc->link = $clink ;
                $rc->timestamp = $time;
@@ -2516,10 +2518,10 @@ class Skin {
 
                # Make user link (or user contributions for unregistered users)
                if ( $rc_user == 0 ) {
-                       $userLink = $this->makeKnownLink( $wgLang->specialPage( 'Contributions' ),
+                       $userLink = $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
                        $rc_user_text, 'target=' . $rc_user_text );
                } else {
-                       $userLink = $this->makeLink( $wgLang->getNsText(
+                       $userLink = $this->makeLink( $wgContLang->getNsText(
                          Namespace::getUser() ) . ':'.$rc_user_text, $rc_user_text );
                }
 
@@ -2529,13 +2531,13 @@ class Skin {
                $rc->difflink = $diffLink;
 
                # Make user talk link
-               $utns=$wgLang->getNsText(NS_USER_TALK);
-               $talkname=$wgLang->getNsText(NS_TALK); # use the shorter name
+               $utns=$wgContLang->getNsText(NS_USER_TALK);
+               $talkname=$wgContLang->getNsText(NS_TALK); # use the shorter name
                $userTalkLink= $this->makeLink($utns . ':'.$rc_user_text, $talkname );
 
                global $wgDisableAnonTalk;
                if ( ( 0 == $rc_user ) && $wgUser->isSysop() ) {
-                       $blockLink = $this->makeKnownLink( $wgLang->specialPage(
+                       $blockLink = $this->makeKnownLink( $wgContLang->specialPage(
                          'Blockip' ), wfMsg( 'blocklink' ), 'ip='.$rc_user_text );
                        if( $wgDisableAnonTalk )
                                $rc->usertalklink = ' ('.$blockLink.')';
@@ -2582,7 +2584,7 @@ class Skin {
         * temporarily to a value pass. Should be adjusted further. --brion
         */
        function formatComment($comment, $title = NULL) {
-               global $wgLang;
+               global $wgContLang;
                $comment = htmlspecialchars( $comment );
 
                # The pattern for autogen comments is / * foo * /, which makes for
@@ -2613,7 +2615,7 @@ class Skin {
 
                # format regular and media links - all other wiki formatting
                # is ignored
-               $medians = $wgLang->getNsText(Namespace::getMedia()).':';
+               $medians = $wgContLang->getNsText(Namespace::getMedia()).':';
                while(preg_match('/\[\[(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) {
                        # Handle link renaming [[foo|text]] will show link as "text"
                        if( "" != $match[3] ) {
@@ -2643,7 +2645,7 @@ class Skin {
        }
 
        function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description ) {
-               global $wgUser, $wgLang, $wgTitle;
+               global $wgUser, $wgLang, $wgContLang, $wgTitle;
 
                $datetime = $wgLang->timeanddate( $timestamp, true );
                $del = wfMsg( 'deleteimg' );
@@ -2681,7 +2683,7 @@ class Skin {
                if ( 0 == $user ) {
                        $userlink = $usertext;
                } else {
-                       $userlink = $this->makeLink( $wgLang->getNsText( Namespace::getUser() ) .
+                       $userlink = $this->makeLink( $wgContLang->getNsText( Namespace::getUser() ) .
                                       ':'.$usertext, $usertext );
                }
                $nbytes = wfMsg( 'nbytes', $size );
@@ -2692,7 +2694,7 @@ class Skin {
 
                if ( '' != $description && '*' != $description ) {
                        $sk=$wgUser->getSkin();
-                       $s .= $wgLang->emphasize(' (' . $sk->formatComment($description,$wgTitle) . ')');
+                       $s .= $wgContLang->emphasize(' (' . $sk->formatComment($description,$wgTitle) . ')');
                }
                $s .= "</li>\n";
                return $s;
@@ -2752,13 +2754,13 @@ class Skin {
 
        function editSectionLinkForOther( $title, $section ) {
                global $wgRequest;
-               global $wgUser, $wgLang;
+               global $wgUser, $wgContLang;
 
                $title = Title::newFromText($title);
                $editurl = '&section='.$section;
                $url = $this->makeKnownLink($title->getPrefixedText(),wfMsg('editsection'),'action=edit'.$editurl);
 
-               if( $wgLang->isRTL() ) {
+               if( $wgContLang->isRTL() ) {
                        $farside = 'left';
                        $nearside = 'right';
                } else {
@@ -2771,7 +2773,7 @@ class Skin {
 
        function editSectionLink( $section ) {
                global $wgRequest;
-               global $wgTitle, $wgUser, $wgLang;
+               global $wgTitle, $wgUser, $wgContLang;
 
                if( $wgRequest->getInt( 'oldid' ) && ( $wgRequest->getVal( 'diff' ) != '0' ) ) {
                        # Section edit links would be out of sync on an old page.
@@ -2783,7 +2785,7 @@ class Skin {
                $editurl = '&section='.$section;
                $url = $this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('editsection'),'action=edit'.$editurl);
 
-               if( $wgLang->isRTL() ) {
+               if( $wgContLang->isRTL() ) {
                        $farside = 'left';
                        $nearside = 'right';
                } else {
index 24bb15c..1956891 100644 (file)
@@ -106,8 +106,8 @@ class SkinPHPTal extends Skin {
         * initialize various variables and generate the template
         */
        function outputPage( &$out ) {
-               global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
-               global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
+               global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
+               global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
                global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
                global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgSiteNotice;
                global $wgMaxCredits, $wgShowCreditsIfMax;
@@ -127,7 +127,7 @@ class SkinPHPTal extends Skin {
                $this->iscontent = ($wgTitle->getNamespace() != Namespace::getSpecial() );
                $this->iseditable = ($this->iscontent and !($action == 'edit' or $action == 'submit'));
                $this->username = $wgUser->getName();
-               $this->userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
+               $this->userpage = $wgContLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
                $this->userpageUrlDetails = $this->makeUrlDetails($this->userpage);
 
                $this->usercss =  $this->userjs = $this->userjsprev = false;
@@ -184,10 +184,10 @@ class SkinPHPTal extends Skin {
                $tpl->set( 'searchaction', $this->escapeSearchLink() );
                $tpl->setRef( 'stylepath', $wgStylePath );
                $tpl->setRef( 'logopath', $wgLogo );
-               $tpl->setRef( "lang", $wgLanguageCode );
-               $tpl->set( 'dir', $wgLang->isRTL() ? "rtl" : "ltr" );
-               $tpl->set( 'rtl', $wgLang->isRTL() );
-               $tpl->set( 'langname', $wgLang->getLanguageName( $wgLanguageCode ) );
+               $tpl->setRef( "lang", $wgContLanguageCode );
+               $tpl->set( 'dir', $wgContLang->isRTL() ? "rtl" : "ltr" );
+               $tpl->set( 'rtl', $wgContLang->isRTL() );
+               $tpl->set( 'langname', $wgContLang->getLanguageName( $wgContLanguageCode ) );
                $tpl->setRef( 'username', $this->username );
                $tpl->setRef( 'userpage', $this->userpage);
                $tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href']);
@@ -206,7 +206,7 @@ class SkinPHPTal extends Skin {
 
                                $ntl = wfMsg( 'newmessages',
                                $this->makeKnownLink(
-                                       $wgLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
+                                       $wgContLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
                                        . ':' . $this->username,
                                        wfMsg('newmessageslink') )
                                );
@@ -260,8 +260,8 @@ class SkinPHPTal extends Skin {
                foreach( $wgOut->getLanguageLinks() as $l ) {
                        $nt = Title::newFromText( $l );
                        $language_urls[] = array('href' => $nt->getFullURL(),
-                       'text' => ($wgLang->getLanguageName( $nt->getInterwiki()) != ''?$wgLang->getLanguageName( $nt->getInterwiki()) : $l),
-                       'class' => $wgLang->isRTL() ? 'rtl' : 'ltr');
+                       'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
+                       'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr');
                }
                if(count($language_urls)) {
                        $tpl->setRef( 'language_urls', $language_urls);
@@ -642,11 +642,11 @@ class SkinPHPTal extends Skin {
         * returns css with user-specific options
         */
        function getUserStylesheet() {
-               global $wgUser, $wgRequest, $wgTitle, $wgLang, $wgSquidMaxage, $wgStylePath;
+               global $wgUser, $wgRequest, $wgTitle, $wgContLang, $wgSquidMaxage, $wgStylePath;
                $action = $wgRequest->getText('action');
                $maxage = $wgRequest->getText('maxage');
                $s = "/* generated user stylesheet */\n";
-               if($wgLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->stylename.'/rtl.css";'."\n";
+               if($wgContLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->stylename.'/rtl.css";'."\n";
                $s .= '@import "'.
                $this->makeNSUrl(ucfirst($this->skinname).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI)."\";\n";
                if($wgUser->getID() != 0) {
index 0525e94..1989af3 100644 (file)
@@ -9,12 +9,12 @@
  *
  */
 function wfSpecialAllpages( $par=NULL ) {
-       global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgLang;
+       global $indexMaxperpage, $toplevelMaxperpage, $wgRequest, $wgOut, $wgContLang;
        $indexMaxperpage = 480;
        $toplevelMaxperpage = 50;
        $from = $wgRequest->getVal( 'from' );
        $namespace = $wgRequest->getInt( 'namespace' );
-       $names = $wgLang->getNamespaces();
+       $names = $wgContLang->getNamespaces();
        if( !isset( $names[$namespace] ) ) {
                $namespace = 0;
        }
@@ -31,12 +31,12 @@ function wfSpecialAllpages( $par=NULL ) {
 }
 
 function namespaceForm ( $namespace = 0, $from = '' ) {
-       global $wgLang, $wgScript;
+       global $wgContLang, $wgScript;
 
        $t = Title::makeTitle( NS_SPECIAL, "Allpages" );
 
        $namespaceselect = '<select name="namespace">';
-       $arr = $wgLang->getNamespaces();
+       $arr = $wgContLang->getNamespaces();
        for ( $i = 0; $i < 14; $i++ ) {
                $namespacename = str_replace ( "_", " ", $arr[$i] );
                $n = ($i == 0) ? wfMsg ( 'articlenamespace' ) : $namespacename;
@@ -58,7 +58,7 @@ function namespaceForm ( $namespace = 0, $from = '' ) {
 }
 
 function indexShowToplevel ( $namespace = 0 ) {
-       global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgLang, $wgRequest, $wgUser;
+       global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser;
        $sk = $wgUser->getSkin();
        $fname = "indexShowToplevel";
        $namespace = intval ($namespace);
@@ -132,7 +132,7 @@ function indexShowToplevel ( $namespace = 0 ) {
        $morelinks = "";
        if ( $offset > 0 ) {
                $morelinks = $sk->makeKnownLink (
-                       $wgLang->specialPage ( "Allpages" ),
+                       $wgContLang->specialPage ( "Allpages" ),
                        wfMsg ( 'allpagesprev' ),
                        ( $offset > $toplevelMaxperpage ) ? 'offset='.($offset-$toplevelMaxperpage) : ''
                );
@@ -140,7 +140,7 @@ function indexShowToplevel ( $namespace = 0 ) {
        if ( $stopat < $sections-1 ) {
                if ( $morelinks != "" ) { $morelinks .= " | "; }
                $morelinks .= $sk->makeKnownLink (
-                       $wgLang->specialPage ( "Allpages" ),
+                       $wgContLang->specialPage ( "Allpages" ),
                        wfMsg ( 'allpagesnext' ),
                        'offset=' . ($offset + $toplevelMaxperpage)
                );
@@ -178,7 +178,7 @@ function indexShowline( $inpoint, $outpoint, $namespace = 0 ) {
 }
 
 function indexShowChunk( $from, $namespace = 0 ) {
-       global $wgOut, $wgUser, $indexMaxperpage, $wgLang;
+       global $wgOut, $wgUser, $indexMaxperpage, $wgContLang;
        $sk = $wgUser->getSkin();
        $maxPlusOne = $indexMaxperpage + 1;
        $namespacee = intval($namespace);
@@ -224,12 +224,12 @@ function indexShowChunk( $from, $namespace = 0 ) {
        $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
        $out2 .= '<tr valign="top"><td align="left">' . $nsForm;
        $out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
-                       $sk->makeKnownLink( $wgLang->specialPage( "Allpages" ),
+                       $sk->makeKnownLink( $wgContLang->specialPage( "Allpages" ),
                                wfMsg ( 'allpages' ) );
        if ( ($n == $indexMaxperpage) && ($s = $dbr->fetchObject( $res )) ) {
                $namespaceparam = $namespace ? "&namespace=$namespace" : "";
                $out2 .= " | " . $sk->makeKnownLink(
-                       $wgLang->specialPage( "Allpages" ),
+                       $wgContLang->specialPage( "Allpages" ),
                        wfMsg ( 'nextpage', $s->cur_title ),
                        "from=" . wfUrlEncode ( $s->cur_title ) . $namespaceparam );
        }
index 6096623..1876d81 100644 (file)
@@ -90,7 +90,7 @@ class SqlQueryForm {
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgServer, $wgScript, $wgArticlePath, $wgLang;
+               global $wgOut, $wgUser, $wgServer, $wgScript, $wgArticlePath, $wgLang, $wgContLang;
                global $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname, $wgSqlTimeout;
 
                # Use a limit, folks!
@@ -134,7 +134,7 @@ class SqlQueryForm {
                                foreach ( $a as $y ) {
                                        $sTitle = htmlspecialchars( $y->cur_title );
                                        if ( $y->cur_namespace ) {
-                                               $sNamespace = $wgLang->getNsText( $y->cur_namespace );
+                                               $sNamespace = $wgContLang->getNsText( $y->cur_namespace );
                                                $link = "$sNamespace:$sTitle";
                                        } else {
                                                $link = "$sTitle";
@@ -159,7 +159,7 @@ class SqlQueryForm {
                                                        if( $x == "cur_title" ) $namespace = $y->cur_namespace;
                                                        if( $x == "old_title" ) $namespace = $y->old_namespace;
                                                        if( $x == "rc_title" ) $namespace = $y->rc_namespace;
-                                                       if( $namespace ) $o = $wgLang->getNsText( $namespace ) . ":" . $o;
+                                                       if( $namespace ) $o = $wgContLang->getNsText( $namespace ) . ":" . $o;
                                                        $o = "<a href=\"" . wfLocalUrlE($o) . "\" class='internal'>" .
                                                          htmlspecialchars( $y->$x ) . "</a>" ;
                                                        } else {
index a00d4fb..75847a0 100644 (file)
@@ -47,7 +47,7 @@ class BookSourceList {
        }
        
        function showList() {
-               global $wgOut, $wgUser, $wgLang;
+               global $wgOut, $wgUser, $wgContLang;
                $fname = "BookSourceList::showList()";
                
                # First, see if we have a custom list setup in
@@ -63,7 +63,7 @@ class BookSourceList {
                
                # Otherwise, use the list of links in the default Language.php file.
                $s = wfMsg( "booksourcetext" ) . "<ul>\n";
-               $bs = $wgLang->getBookstoreList() ;
+               $bs = $wgContLang->getBookstoreList() ;
                $bsn = array_keys ( $bs ) ;
                foreach ( $bsn as $name ) {
                        $adr = $bs[$name] ;
index a7514ba..299bc81 100644 (file)
@@ -42,9 +42,9 @@ class BrokenRedirectsPage extends PageQueryPage {
        }
        
        function formatResult( $skin, $result ) {
-               global $wgLang ;
+               global $wgContLang ;
                
-               $ns = $wgLang->getNamespaces() ;
+               $ns = $wgContLang->getNamespaces() ; /* not used, why bother? */
                $from = $skin->makeKnownLink( $result->cur_title ,'', 'redirect=no' );
                $edit = $skin->makeBrokenLink( $result->cur_title , "(".wfMsg("qbedit").")" , 'redirect=no');
                $to   = $skin->makeBrokenLink( $result->bl_to );
index 431877c..9a97865 100644 (file)
@@ -13,7 +13,7 @@
  * @param      string  $par    (optional) user name of the user for which to show the contributions
  */
 function wfSpecialContributions( $par = '' ) {
-       global $wgUser, $wgOut, $wgLang, $wgRequest;
+       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
        $fname = "wfSpecialContributions";
 
        if( $par )
@@ -69,12 +69,12 @@ function wfSpecialContributions( $par = '' ) {
        if ( $hideminor ) {
                $cmq = "AND cur_minor_edit=0";
                $omq = "AND old_minor_edit=0";
-               $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+               $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
                  WfMsg( "show" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) .
                  "&offset={$offset}&limit={$limit}&hideminor=0" );
        } else {
                $cmq = $omq = "";
-               $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+               $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
                  WfMsg( "hide" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) .
                  "&offset={$offset}&limit={$limit}&hideminor=1" );
        }
@@ -106,7 +106,7 @@ function wfSpecialContributions( $par = '' ) {
        $wgOut->addHTML( "<p>{$top}\n" );
 
        $sl = wfViewPrevNext( $offset, $limit,
-         $wgLang->specialpage( "Contributions" ),
+         $wgContLang->specialpage( "Contributions" ),
          "hideminor={$hideminor}&target=" . wfUrlEncode( $target ),
          ($nCur + $nOld) <= $offlimit);
 
@@ -233,11 +233,11 @@ function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew, $t
  *
  */
 function ucCountLink( $lim, $d ) {
-       global $wgUser, $wgLang, $wgRequest;
+       global $wgUser, $wgContLang, $wgRequest;
 
        $target = $wgRequest->getText( 'target' );
        $sk = $wgUser->getSkin();
-       $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+       $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
          "{$lim}", "target={$target}&days={$d}&limit={$lim}" );
        return $s;
 }
@@ -246,11 +246,11 @@ function ucCountLink( $lim, $d ) {
  *
  */
 function ucDaysLink( $lim, $d ) {
-       global $wgUser, $wgLang, $wgRequest;
+       global $wgUser, $wgContLang, $wgRequest;
 
        $target = $wgRequest->getText( 'target' );
        $sk = $wgUser->getSkin();
-       $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+       $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
          "{$d}", "target={$target}&days={$d}&limit={$lim}" );
        return $s;
 }
index 5f76938..4eaedc3 100644 (file)
@@ -54,8 +54,8 @@ class DisambiguationsPage extends PageQueryPage {
        }
        
        function formatResult( $skin, $result ) {
-               global $wgLang ;
-               $ns = $wgLang->getNamespaces() ;
+               global $wgContLang ;
+               $ns = $wgContLang->getNamespaces() ;
 
                $from = $skin->makeKnownLink( $ns[$result->ns_art].':'.$result->title_art ,'');
                $edit = $skin->makeBrokenLink( $ns[$result->ns_art].':'.$result->title_art , "(".wfMsg("qbedit").")" , 'redirect=no');
index 20937b2..126ef2b 100644 (file)
@@ -46,8 +46,8 @@ class DoubleRedirectsPage extends PageQueryPage {
        }
        
        function formatResult( $skin, $result ) {
-               global $wgLang ;
-               $ns = $wgLang->getNamespaces() ;
+               global $wgContLang ;
+               $ns = $wgContLang->getNamespaces() ;
                $from = $skin->makeKnownLink( $ns[$result->ns_a].':'.$result->title_a ,'', 'redirect=no' );
                $edit = $skin->makeBrokenLink( $ns[$result->ns_a].':'.$result->title_a , "(".wfMsg("qbedit").")" , 'redirect=no');
                $to   = $skin->makeKnownLink( $ns[$result->ns_b].':'.$result->title_b ,'');
index 9bd7c7c..2c6a2c5 100644 (file)
@@ -60,15 +60,15 @@ function wfSpecialExport( $page = '' ) {
 }
 
 function pages2xml( $pages, $curonly = false ) {
-       global $wgLanguageCode, $wgInputEncoding, $wgLang;
+       global $wgContLanguageCode, $wgInputEncoding, $wgContLang;
        $xml = "<" . "?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n" .
-               "<mediawiki version=\"0.1\" xml:lang=\"$wgLanguageCode\">\n";
+               "<mediawiki version=\"0.1\" xml:lang=\"$wgContLanguageCode\">\n";
        foreach( $pages as $page ) {
                $xml .= page2xml( $page, $curonly );
        }
        $xml .= "</mediawiki>\n";
        if($wgInputEncoding != "utf-8")
-               $xml = $wgLang->iconv( $wgInputEncoding, "utf-8", $xml );
+               $xml = $wgContLang->iconv( $wgInputEncoding, "utf-8", $xml );
        return $xml;
 }
 
index b500224..af2df34 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 function wfSpecialImagelist() {
-       global $wgUser, $wgOut, $wgLang, $wgRequest;
+       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
        
        $sort = $wgRequest->getVal( 'sort' );
        $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
@@ -67,7 +67,7 @@ function wfSpecialImagelist() {
          htmlspecialchars( $wpIlMatch ) . "\" /> " .
          "<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
        $nums = array( 50, 100, 250, 500 );
-       $here = $wgLang->specialPage( "Imagelist" );
+       $here = $wgContLang->specialPage( "Imagelist" );
 
        $fill = "";
        $first = true;
@@ -110,7 +110,7 @@ function wfSpecialImagelist() {
                $name = $s->img_name;
                $ut = $s->img_user_text;
                if ( 0 == $s->img_user ) { $ul = $ut; }
-               else { $ul = $sk->makeLink( $wgLang->getNsText(
+               else { $ul = $sk->makeLink( $wgContLang->getNsText(
                  Namespace::getUser() ) . ":{$ut}", $ut ); }
 
                $ilink = "<a href=\"" . Image::wfImageUrl( $name ) .
@@ -118,7 +118,7 @@ function wfSpecialImagelist() {
 
                $nb = wfMsg( "nbytes", $wgLang->formatNum( $s->img_size ) );
                $l = "(" .
-                 $sk->makeKnownLink( $wgLang->getNsText(
+                 $sk->makeKnownLink( $wgContLang->getNsText(
                  Namespace::getImage() ) . ":{$name}", wfMsg( "imgdesc" ) ) .
                  ") {$ilink} . . {$nb} . . {$ul} . . " .
                  $wgLang->timeanddate( $s->img_timestamp, true );
index 08534fe..49b7204 100644 (file)
@@ -148,12 +148,12 @@ class WikiRevision {
        }
        
        function fixEncoding( $data ) {
-               global $wgLang, $wgInputEncoding;
+               global $wgContLang, $wgInputEncoding;
                
                if( strcasecmp( $wgInputEncoding, "utf-8" ) == 0 ) {
                        return $data;
                } else {
-                       return $wgLang->iconv( "utf-8", $wgInputEncoding, $data );
+                       return $wgContLang->iconv( "utf-8", $wgInputEncoding, $data );
                }
        }
        
index ada1ba0..8d427ac 100644 (file)
@@ -133,7 +133,7 @@ class IPUnblockForm {
  * Callback function to output a block
  */
 function wfAddRow( $block, $tag ) {
-       global $wgOut, $wgUser, $wgLang;
+       global $wgOut, $wgUser, $wgLang, $wgContLang;
 
        $sk = $wgUser->getSkin();
 
@@ -141,7 +141,7 @@ function wfAddRow( $block, $tag ) {
        $addr = $block->mAuto ? "#{$block->mId}" : $block->mAddress;
 
        $name = User::whoIs( $block->mBy );
-       $ulink = $sk->makeKnownLink( $wgLang->getNsText( Namespace::getUser() ). ":{$name}", $name );
+       $ulink = $sk->makeKnownLink( $wgContLang->getNsText( Namespace::getUser() ). ":{$name}", $name );
        $formattedTime = $wgLang->timeanddate( $block->mTimestamp, true );
        
        if ( $block->mExpiry === "" ) {
index e5aeaf2..75417fe 100644 (file)
@@ -38,8 +38,8 @@ class ListUsersPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
-               $name = $skin->makeLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
+               global $wgContLang;
+               $name = $skin->makeLink( $wgContLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
                if( '' != $result->type ) {
                        $name .= ' (' .
                        $skin->makeLink( wfMsg( "administrators" ), $result->type) .
index 59547d4..e3c0b5a 100644 (file)
@@ -335,7 +335,7 @@ class LogViewer {
         * @private
         */
        function showPrevNext( &$out ) {
-               global $wgLang;
+               global $wgContLang;
                $pieces = array();
                $pieces[] = 'type=' . htmlspecialchars( $this->reader->queryType() );
                $pieces[] = 'user=' . htmlspecialchars( $this->reader->queryUser() );
@@ -346,7 +346,7 @@ class LogViewer {
                # TODO: use timestamps instead of offsets to make it more natural
                # to go huge distances in time
                $html = wfViewPrevNext( $offset, $limit,
-                       $wgLang->specialpage( 'Log' ),
+                       $wgContLang->specialpage( 'Log' ),
                        $bits,
                        false);
                $out->addHTML( '<p>' . $html . '</p>' );
index 8ae913c..6f74bd5 100644 (file)
@@ -9,8 +9,8 @@
  * shortcut to get the current language "special" namespace name
  */
 function sns() {
-       global $wgLang ;
-       $ns = $wgLang->getNamespaces() ;
+       global $wgContLang ;
+       $ns = $wgContLang->getNamespaces() ;
        return $ns[NS_SPECIAL] ;
 }
 
@@ -19,7 +19,7 @@ function sns() {
  * Entry point
  */
 function wfSpecialMaintenance( $par=NULL ) {
-       global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest, $wgLanguageCode;
+       global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest, $wgContLanguageCode;
        global $wgMiserMode;
 
        # This pages is expensive ressource wise
@@ -53,7 +53,7 @@ function wfSpecialMaintenance( $par=NULL ) {
        if ( !is_null( $submitmll ) ) return wfSpecialMissingLanguageLinks() ;
 
        $sk = $wgUser->getSkin();
-       $ns = $wgLang->getNamespaces() ;
+       $ns = $wgContLang->getNamespaces() ;
 
        # Generate page output
        
@@ -80,10 +80,10 @@ function wfSpecialMaintenance( $par=NULL ) {
        $r .= "\">\n" ;
        $r .= "<select name=\"thelang\">\n" ;
        
-       $a = $wgLang->getLanguageNames();
+       $a = $wgContLang->getLanguageNames();
        $ak = array_keys ( $a ) ;
        foreach ( $ak AS $k ) {
-               if ( $k != $wgLanguageCode )
+               if ( $k != $wgContLanguageCode )
                        $r .= "<option value='{$k}'>{$a[$k]}</option>\n" ;
        }
        $r .= "</select>\n" ;
@@ -104,9 +104,9 @@ function getMPL ( $x ) {
 
 
 function getMaintenancePageBacklink( $subfunction ) {
-       global $wgUser , $wgLang;
+       global $wgUser , $wgContLang;
        $sk = $wgUser->getSkin() ;
-       $ns = $wgLang->getNamespaces() ;
+       $ns = $wgContLang->getNamespaces() ;
        $r = $sk->makeKnownLink (
                $ns[-1].':Maintenance',
                wfMsg( 'maintenancebacklink' ) ) ;
@@ -188,7 +188,7 @@ function wfSpecialSelfLinks() {
  * 
  */
 function wfSpecialMispeelings () {
-       global $wgUser, $wgOut, $wgLang, $wgTitle;
+       global $wgUser, $wgOut, $wgContLang, $wgTitle;
        $sk = $wgUser->getSkin();
        $fname = 'wfSpecialMispeelings';
 
@@ -199,7 +199,7 @@ function wfSpecialMispeelings () {
        # Determine page name
        $ms = wfMsg ( 'mispeelingspage' ) ;
        $mss = str_replace ( ' ' , '_' , $ms );
-       $msp = $wgLang->getNsText(4).':'.$ms ;
+       $msp = $wgContLang->getNsText(4).':'.$ms ;
        $msl = $sk->makeKnownLink ( $msp ) ;
 
        # Load list from database
@@ -219,7 +219,7 @@ function wfSpecialMispeelings () {
                        $x = preg_replace( '/^(\S+).*$/', '$1', $x );
                        $sql = "SELECT DISTINCT cur_title FROM $cur,$searchindex WHERE cur_id=si_page AND ".
                                "cur_namespace=0 AND cur_is_redirect=0 AND " .
-                               "(MATCH(si_text) AGAINST ('" . $dbr->strencode( $wgLang->stripForSearch( $x ) ) . "'))" ;
+                               "(MATCH(si_text) AGAINST ('" . $dbr->strencode( $wgContLang->stripForSearch( $x ) ) . "'))" ;
                        $res = $dbr->query( $sql, $fname );
                        while ( $obj = $dbr->fetchObject ( $res ) ) {
                                if ( $cnt >= $offset AND $cnt < $offset+$limit ) {
@@ -257,7 +257,7 @@ function wfSpecialMispeelings () {
  *
  */
 function wfSpecialMissingLanguageLinks() {
-       global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
+       global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
        
        $fname = 'wfSpecialMissingLanguageLinks';
        $thelang = $wgRequest->getText( 'thelang' );
@@ -275,7 +275,7 @@ function wfSpecialMissingLanguageLinks() {
        $res = $dbr->query( $sql, $fname );
 
 
-       $mll = wfMsg( 'missinglanguagelinkstext', $wgLang->getLanguageName($thelang) );
+       $mll = wfMsg( 'missinglanguagelinkstext', $wgContLang->getLanguageName($thelang) );
 
        $top = getMaintenancePageBacklink( 'missinglanguagelinks' );
        $top .= "<p>$mll</p><br>";
index 452d24e..8f85817 100644 (file)
@@ -11,7 +11,7 @@ require_once( 'ImageGallery.php' );
  *
  */
 function wfSpecialNewimages() {
-       global $wgUser, $wgOut, $wgLang, $wgRequest;
+       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
        
        $sort = $wgRequest->getVal( 'sort' );
        $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
@@ -60,7 +60,7 @@ function wfSpecialNewimages() {
          htmlspecialchars( $wpIlMatch ) . "\" /> " .
          "<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
        $nums = array( 50, 100, 250, 500 );
-       $here = $wgLang->specialPage( "Imagelist" );
+       $here = $wgContLang->specialPage( "Imagelist" );
 
        $fill = "";
        $first = true;
@@ -85,7 +85,7 @@ function wfSpecialNewimages() {
 
                $nt = Title::newFromText( $name, NS_IMAGE );
                $img = Image::newFromTitle( $nt );
-               $ul = $sk->makeLink( $wgLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut );
+               $ul = $sk->makeLink( $wgContLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut );
 
                $gallery->add( $img, $ul.'<br /><i>'.$wgLang->timeanddate( $s->img_timestamp, true ).'</i><br />' );
                $i++;
index df77063..33a4a00 100644 (file)
@@ -54,7 +54,7 @@ class NewPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang, $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
+               global $wgLang, $wgContLang, $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
                $u = $result->user;
                $ut = $result->user_text;
 
@@ -65,7 +65,7 @@ class NewPagesPage extends QueryPage {
                        $ul = $ut;
                }
                else {
-                       $ul = $skin->makeLink( $wgLang->getNsText(NS_USER) . ":{$ut}", $ut );
+                       $ul = $skin->makeLink( $wgContLang->getNsText(NS_USER) . ":{$ut}", $ut );
                }
 
                $d = $wgLang->timeanddate( $result->timestamp, true );
index 341d822..f45b93f 100644 (file)
@@ -36,7 +36,7 @@ class PreferencesForm {
         * Load some values
         */
        function PreferencesForm( &$request ) { 
-               global $wgLang, $wgAllowRealName;
+               global $wgLang, $wgContLang, $wgAllowRealName;
                
                $this->mQuickbar = $request->getVal( 'wpQuickbar' );
                $this->mOldpass = $request->getVal( 'wpOldpass' );
@@ -81,7 +81,7 @@ class PreferencesForm {
                # Note: namespaces don't necessarily have consecutive keys
                $this->mSearchNs = array();
                if ( $this->mPosted ) {
-                       $namespaces = $wgLang->getNamespaces();
+                       $namespaces = $wgContLang->getNamespaces();
                        foreach ( $namespaces as $i => $namespace ) {
                                if ( $i >= 0 ) {
                                        $this->mSearchNs[$i] = $request->getCheck( "wpNs$i" ) ? 1 : 0;
@@ -218,7 +218,7 @@ class PreferencesForm {
         * @access private
         */
        function resetPrefs() {
-               global $wgUser, $wgLang, $wgAllowRealName;
+               global $wgUser, $wgLang, $wgContLang, $wgAllowRealName;
 
                $this->mOldpass = $this->mNewpass = $this->mRetypePass = '';
                $this->mUserEmail = $wgUser->getEmail();
@@ -249,7 +249,7 @@ class PreferencesForm {
                        $this->mToggles[$tname] = $wgUser->getOption( $tname );
                }
 
-               $namespaces = $wgLang->getNamespaces();
+               $namespaces = $wgContLang->getNamespaces();
                foreach ( $namespaces as $i => $namespace ) {
                        if ( $i >= 0 ) {
                                $this->mSearchNs[$i] = $wgUser->getOption( 'searchNs'.$i );
@@ -261,10 +261,10 @@ class PreferencesForm {
         * @access private
         */
        function namespacesCheckboxes() {
-               global $wgLang, $wgUser;
+               global $wgContLang, $wgUser;
                
                # Determine namespace checkboxes
-               $namespaces = $wgLang->getNamespaces();
+               $namespaces = $wgContLang->getNamespaces();
                $r1 = '';
 
                foreach ( $namespaces as $i => $name ) {