r51819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51818‎ | r51819 | r51820 >
Date:12:24, 13 June 2009
Author:siebrand
Status:ok
Tags:
Comment:
* follow-up to r51568: $id should not have been made an array
* use linkKnown() instead of deprecated makeKnownLink()
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1426,7 +1426,8 @@
14271427
14281428 $out = '';
14291429 if( $wgRightsPage ) {
1430 - $link = $this->makeKnownLink( $wgRightsPage, $wgRightsText );
 1430+ $title = Title::newFromText( $wgRightsPage );
 1431+ $link = $this->linkKnown( $title, $wgRightsText );
14311432 } elseif( $wgRightsUrl ) {
14321433 $link = $this->makeExternalLink( $wgRightsUrl, $wgRightsText );
14331434 } elseif( $wgRightsText ) {
@@ -1544,8 +1545,11 @@
15451546 }
15461547
15471548 function copyrightLink() {
1548 - $s = $this->makeKnownLink( wfMsgForContent( 'copyrightpage' ),
1549 - wfMsg( 'copyrightpagename' ) );
 1549+ $title = Title::newFromText( wfMsgForContent( 'copyrightpage' ) );
 1550+ $s = $this->linkKnown(
 1551+ $title,
 1552+ wfMsg( 'copyrightpagename' )
 1553+ );
15501554 return $s;
15511555 }
15521556
@@ -1558,8 +1562,11 @@
15591563 // Otherwise, we display the link for the user, described in their
15601564 // language (which may or may not be the same as the default language),
15611565 // but we make the link target be the one site-wide page.
1562 - return $this->makeKnownLink( wfMsgForContent( $page ),
1563 - wfMsgExt( $desc, array( 'parsemag', 'escapenoentities' ) ) );
 1566+ $title = Title::newFromText( $page );
 1567+ return $this->linkKnown(
 1568+ $title,
 1569+ wfMsgExt( $desc, array( 'parsemag', 'escapenoentities' ) )
 1570+ );
15641571 }
15651572 }
15661573
@@ -1673,11 +1680,11 @@
16741681 if ( $this->mTitle->userIsWatching() ) {
16751682 $text = wfMsg( 'unwatchthispage' );
16761683 $query = array( 'action' => 'unwatch' );
1677 - $id = array( 'mw-unwatch-link' => $this->mWatchLinkNum );
 1684+ $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
16781685 } else {
16791686 $text = wfMsg( 'watchthispage' );
16801687 $query = array( 'action' => 'watch' );
1681 - $id = array( 'mw-watch-link' => $this->mWatchLinkNum );
 1688+ $id = 'mw-watch-link' . $this->mWatchLinkNum;
16821689 }
16831690
16841691 $s = $this->link(

Follow-up revisions

RevisionCommit summaryAuthorDate
r51882(bug 19202) Follow-up to r51819: fix incorrect conversion. Put wfMsgForConten...siebrand11:27, 15 June 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51568* replace some use of deprecated makeKnownLinkObj() by link() in core...siebrand15:02, 7 June 2009

Status & tagging log