r47694 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47693‎ | r47694 | r47695 >
Date:09:30, 23 February 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
* Use nlinks instead of nmembers in Wantedfiles (does anybody use this page?)
* Removed dead code in Wantedtemplates
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedfiles.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedtemplates.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWantedtemplates.php
@@ -73,8 +73,6 @@
7474 $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
7575 $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
7676
77 - $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
78 - $wgLang->formatNum( $result->value ) );
7977 return wfSpecialList(
8078 $plink,
8179 $this->makeWlhLink( $nt, $skin, $result )
Index: trunk/phase3/includes/specials/SpecialWantedfiles.php
@@ -72,10 +72,27 @@
7373 $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
7474 $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
7575
76 - $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
77 - $wgLang->formatNum( $result->value ) );
78 - return wfSpecialList($plink, $nlinks);
 76+ return wfSpecialList(
 77+ $plink,
 78+ $this->makeWlhLink( $nt, $skin, $result )
 79+ );
7980 }
 81+
 82+ /**
 83+ * Make a "what links here" link for a given title
 84+ *
 85+ * @param Title $title Title to make the link for
 86+ * @param Skin $skin Skin to use
 87+ * @param object $result Result row
 88+ * @return string
 89+ */
 90+ private function makeWlhLink( $title, $skin, $result ) {
 91+ global $wgLang;
 92+ $wlh = SpecialPage::getTitleFor( 'Whatlinkshere' );
 93+ $label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ),
 94+ $wgLang->formatNum( $result->value ) );
 95+ return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) );
 96+ }
8097 }
8198
8299 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -218,6 +218,7 @@
219219 * (bug 14414) maintenance/updateSpecialPages.php no longer throws error with
220220 PostgreSQL
221221 * (bug 17546) Correct Tongan language native name is "lea faka-Tonga"
 222+* (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
222223
223224 == API changes in 1.15 ==
224225 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Status & tagging log