Attempt to fix links not fixed in the wgLang->wgContLang transition
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Fri, 24 Sep 2004 18:24:01 +0000 (18:24 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Fri, 24 Sep 2004 18:24:01 +0000 (18:24 +0000)
includes/Credits.php
includes/OutputPage.php
includes/Parser.php
includes/Skin.php
includes/SpecialListusers.php
includes/SpecialUpload.php

index 1a9462a..8228052 100644 (file)
@@ -168,9 +168,9 @@ function getContributorCredits($article, $cnt, $showIfMax) {
  *
  */
 function creditLink($user_name, $link_text = '') {
-    global $wgUser, $wgLang;
+    global $wgUser, $wgContLang;
     $skin = $wgUser->getSkin();
-    return $skin->makeLink($wgLang->getNsText(NS_USER) . ':' . $user_name,
+    return $skin->makeLink($wgContLang->getNsText(NS_USER) . ':' . $user_name,
                           (empty($link_text)) ? $user_name : $link_text);
 }
 
index 3f21307..0bb6b14 100644 (file)
@@ -529,7 +529,7 @@ class OutputPage {
                $this->mBodytext = '';
 
                $sk = $wgUser->getSkin();
-               $ap = $sk->makeKnownLink( wfMsg( 'administrators' ), '' );
+               $ap = $sk->makeKnownLink( wfMsgForContent( 'administrators' ), '' );
                $this->addHTML( wfMsg( 'sysoptext', $ap ) );
                $this->returnToMain();
        }
@@ -544,7 +544,7 @@ class OutputPage {
                $this->mBodytext = '';
 
                $sk = $wgUser->getSkin();
-               $ap = $sk->makeKnownLink( wfMsg( 'administrators' ), '' );
+               $ap = $sk->makeKnownLink( wfMsgForContent( 'administrators' ), '' );
                $this->addHTML( wfMsg( 'developertext', $ap ) );
                $this->returnToMain();
        }
@@ -669,7 +669,7 @@ class OutputPage {
 
                $sk = $wgUser->getSkin();
                if ( '' == $returnto ) {
-                       $returnto = wfMsg( 'mainpage' );
+                       $returnto = wfMsgForContent( 'mainpage' );
                }
                $link = $sk->makeKnownLink( $returnto, '' );
 
index c575cda..823748e 100644 (file)
@@ -919,7 +919,7 @@ class Parser
                wfProfileIn( $fname );
 
                $sk =& $this->mOptions->getSkin();
-               $linktrail = wfMsg('linktrail');
+               $linktrail = wfMsgForContent('linktrail');
                $bits = preg_split( EXT_LINK_BRACKETED, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
 
                $s = $this->replaceFreeExternalLinks( array_shift( $bits ) );
index 65677c1..6653572 100644 (file)
@@ -585,7 +585,10 @@ class Skin {
                $action = $wgRequest->getText( 'action' );
 
                $s = $this->printableLink();
-               if ( wfMsg ( 'disclaimers' ) != '-' ) $s .= ' | ' . $this->makeKnownLink( wfMsg( 'disclaimerpage' ), wfMsg( 'disclaimers' ) ) ;
+               if ( wfMsg ( 'disclaimers' ) != '-' )
+                       $s .= ' | ' . $this->makeKnownLink( 
+                               wfMsgForContent( 'disclaimerpage' ), 
+                               wfMsg( 'disclaimers' ) ) ;
 
                if ( $wgOut->isArticleRelated() ) {
                        if ( $wgTitle->getNamespace() == Namespace::getImage() ) {
@@ -761,7 +764,7 @@ class Skin {
                          "returnto={$rt}" ) . ' | ' .
                          $this->specialLink( 'preferences' );
                }
-               $s .= ' | ' . $this->makeKnownLink( wfMsg( 'helppage' ),
+               $s .= ' | ' . $this->makeKnownLink( wfMsgForContent( 'helppage' ),
                  wfMsg( 'help' ) );
 
                return $s;
@@ -981,7 +984,8 @@ class Skin {
 
                }
                // only show watchlist link if logged in
-               if ( wfMsg ( 'currentevents' ) != '-' ) $s .= $sep . $this->makeKnownLink( wfMsg( 'currentevents' ), '' ) ;
+               if ( wfMsg ( 'currentevents' ) != '-' ) 
+                       $s .= $sep . $this->makeKnownLink( wfMsgForContent( 'currentevents' ), '' ) ;
                $s .= "\n<br /><hr class='sep' />";
                $articleExists = $wgTitle->getArticleId();
                if ( $wgOut->isArticle() || $action =='edit' || $action =='history' || $wpPreview) {
@@ -1142,26 +1146,27 @@ class Skin {
        }
 
        function mainPageLink() {
-               $mp = wfMsg( 'mainpage' );
-               $s = $this->makeKnownLink( $mp, $mp );
+               $mp = wfMsgForContent( 'mainpage' );
+               $mptxt = wfMsg( 'mainpage');
+               $s = $this->makeKnownLink( $mp, $mptxt );
                return $s;
        }
 
        function copyrightLink() {
-               $s = $this->makeKnownLink( wfMsg( 'copyrightpage' ),
+               $s = $this->makeKnownLink( wfMsgForContent( 'copyrightpage' ),
                  wfMsg( 'copyrightpagename' ) );
                return $s;
        }
 
        function aboutLink() {
-               $s = $this->makeKnownLink( wfMsg( 'aboutpage' ),
+               $s = $this->makeKnownLink( wfMsgForContent( 'aboutpage' ),
                  wfMsg( 'aboutsite' ) );
                return $s;
        }
 
 
        function disclaimerLink() {
-               $s = $this->makeKnownLink( wfMsg( 'disclaimerpage' ),
+               $s = $this->makeKnownLink( wfMsgForContent( 'disclaimerpage' ),
                  wfMsg( 'disclaimers' ) );
                return $s;
        }
@@ -1349,7 +1354,7 @@ class Skin {
        }
 
        function bugReportsLink() {
-               $s = $this->makeKnownLink( wfMsg( 'bugreportspage' ),
+               $s = $this->makeKnownLink( wfMsgForContent( 'bugreportspage' ),
                  wfMsg( 'bugreports' ) );
                return $s;
        }
@@ -2629,7 +2634,7 @@ class Skin {
                                $thelink = $this->makeMediaLink( $submatch[1], "", $text );
                        } else {
                                # Other kind of link
-                               if( preg_match( wfMsg( "linktrail" ), $match[4], $submatch ) ) {
+                               if( preg_match( wfMsgForContent( "linktrail" ), $match[4], $submatch ) ) {
                                        $trail = $submatch[1];
                                } else {
                                        $trail = "";
index 75417fe..c25da6b 100644 (file)
@@ -42,7 +42,7 @@ class ListUsersPage extends QueryPage {
                $name = $skin->makeLink( $wgContLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
                if( '' != $result->type ) {
                        $name .= ' (' .
-                       $skin->makeLink( wfMsg( "administrators" ), $result->type) .
+                       $skin->makeLink( wfMsgForContent( "administrators" ), $result->type) .
                        ')';
                }
                return $name;
index 1b2e907..3cfa4a0 100644 (file)
@@ -356,7 +356,7 @@ class UploadForm {
                $fd = wfMsg( 'filedesc' );
                $ulb = wfMsg( 'uploadbtn' );
 
-               $clink = $sk->makeKnownLink( wfMsg( 'copyrightpage' ),
+               $clink = $sk->makeKnownLink( wfMsgForContent( 'copyrightpage' ),
                  wfMsg( 'copyrightpagename' ) );
                $ca = wfMsg( 'affirmation', $clink );
                $iw = wfMsg( 'ignorewarning' );