Attempt to fix links not fixed in the wgLang->wgContLang transition
This commit is contained in:
parent
4a89163754
commit
2d244b91f7
6 changed files with 23 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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, '' );
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
|
|
|
|||
|
|
@ -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 = "";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
Loading…
Reference in a new issue