r38707 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38706‎ | r38707 | r38708 >
Date:12:49, 6 August 2008
Author:raymond
Status:old
Tags:
Comment:
* Consistency tweaks with other special pages like move/protect/delete:
** Add a backlink subtitle
** Remove 1 hardcoded '<' backlink and 1 '>' backlink
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -937,6 +937,7 @@
938938 'recentchangeslinked' => array(
939939 'recentchangeslinked',
940940 'recentchangeslinked-title',
 941+ 'recentchangeslinked-backlink',
941942 'recentchangeslinked-noresult',
942943 'recentchangeslinked-summary',
943944 'recentchangeslinked-page',
@@ -1534,8 +1535,7 @@
15351536 'whatlinkshere-title',
15361537 'whatlinkshere-summary',
15371538 'whatlinkshere-page',
1538 - 'whatlinkshere-barrow',
1539 - 'linklistsub',
 1539+ 'whatlinkshere-backlink',
15401540 'linkshere',
15411541 'nolinkshere',
15421542 'nolinkshere-ns',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -310,7 +310,8 @@
311311 'autocomment-prefix',
312312 'listgrouprights-right-display',
313313 'timezone-utc',
314 - 'whatlinkshere-barrow',
 314+ 'whatlinkshere-backlink',
 315+ 'recentchangeslinked-backlink',
315316 );
316317
317318 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -162,14 +162,17 @@
163163 $extraOpts['submit'] = Xml::submitbutton( wfMsg('allpagessubmit') );
164164 return $extraOpts;
165165 }
166 -
167 - function setTopText( &$out, $opts ){}
168 -
 166+
 167+ function setTopText( &$out, $opts ) {
 168+ global $wgOut, $wgUser;
 169+ $skin = $wgUser->getSkin();
 170+ $wgOut->setSubtitle( wfMsg( 'recentchangeslinked-backlink', $skin->link( $this->mTargetTitle, $this->mTargetTitle->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
 171+ }
 172+
169173 function setBottomText( &$out, $opts ){
170174 if( isset( $this->mTargetTitle ) && is_object( $this->mTargetTitle ) ){
171175 global $wgUser;
172176 $out->setFeedAppendQuery( "target=" . urlencode( $this->mTargetTitle->getPrefixedDBkey() ) );
173 - $out->addHTML("&lt; ".$wgUser->getSkin()->makeLinkObj( $this->mTargetTitle, "", "redirect=no" )."<hr />\n");
174177 }
175178 if( isset( $this->mResultEmpty ) && $this->mResultEmpty ){
176179 $out->addWikiMsg( 'recentchangeslinked-noresult' );
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -74,10 +74,8 @@
7575 $this->selfTitle = SpecialPage::getTitleFor( 'Whatlinkshere', $this->target->getPrefixedDBkey() );
7676
7777 $wgOut->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) );
78 - $wgOut->setSubtitle( wfMsgHtml( 'linklistsub' ) );
 78+ $wgOut->setSubtitle( wfMsg( 'whatlinkshere-backlink', $this->skin->link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
7979
80 - $wgOut->addHTML( wfMsgExt( 'whatlinkshere-barrow', array( 'escapenoentities') ) . ' ' .$this->skin->makeLinkObj($this->target, '', 'redirect=no' )."<br />\n");
81 -
8280 $this->showIndirectLinks( 0, $this->target, $opts->getValue( 'limit' ),
8381 $opts->getValue( 'from' ), $opts->getValue( 'back' ) );
8482 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1592,6 +1592,7 @@
15931593 # Recent changes linked
15941594 'recentchangeslinked' => 'Related changes',
15951595 'recentchangeslinked-title' => 'Changes related to "$1"',
 1596+'recentchangeslinked-backlink' => '← $1', # only translate this message to other languages if you have to change it
15961597 'recentchangeslinked-noresult' => 'No changes on linked pages during the given period.',
15971598 'recentchangeslinked-summary' => "This is a list of changes made recently to pages linked from a specified page (or to members of a specified category).
15981599 Pages on [[Special:Watchlist|your watchlist]] are '''bold'''.",
@@ -2306,11 +2307,10 @@
23072308
23082309 # What links here
23092310 'whatlinkshere' => 'What links here',
2310 -'whatlinkshere-title' => 'Pages that link to $1',
 2311+'whatlinkshere-title' => 'Pages that link to "$1"',
23112312 'whatlinkshere-summary' => '', # do not translate or duplicate this message to other languages
23122313 'whatlinkshere-page' => 'Page:',
2313 -'whatlinkshere-barrow' => '>', # only translate this message to other languages if you have to change it
2314 -'linklistsub' => '(List of links)',
 2314+'whatlinkshere-backlink' => '← $1', # only translate this message to other languages if you have to change it
23152315 'linkshere' => "The following pages link to '''[[:$1]]''':",
23162316 'nolinkshere' => "No pages link to '''[[:$1]]'''.",
23172317 'nolinkshere-ns' => "No pages link to '''[[:$1]]''' in the chosen namespace.",

Follow-up revisions

RevisionCommit summaryAuthorDate
r38728Fixes for r38707:...ialex17:35, 6 August 2008

Status & tagging log