r107770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107769‎ | r107770 | r107771 >
Date:12:30, 1 January 2012
Author:bawolff
Status:resolved
Tags:
Comment:
(bug 33447) Link to the broken image tracking category from Special:Wantedfiles

Also add a note about how if you use a foreign repo, you're going to get plenty false positives.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedfiles.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1628,6 +1628,8 @@
16291629 'wantedpages-badtitle',
16301630 'wantedfiles',
16311631 'wantedfiles-summary',
 1632+ 'wantedfiletext-cat',
 1633+ 'wantedfiletext-nocat',
16321634 'wantedtemplates',
16331635 'wantedtemplates-summary',
16341636 'mostlinked',
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -110,6 +110,7 @@
111111 * Added $wgSend404Code, true by default, which can be set to false to send a
112112 200 status code instead of 404 for nonexistent articles.
113113 * (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
 114+* (bug 33447) Link to the broken image tracking category from Special:Wantedfiles
114115
115116 === Bug fixes in 1.19 ===
116117 * $wgUploadNavigationUrl should be used for file redlinks if.
Index: trunk/phase3/includes/specials/SpecialWantedfiles.php
@@ -35,6 +35,32 @@
3636 parent::__construct( $name );
3737 }
3838
 39+ function getPageHeader() {
 40+ # Specifically setting to use "Wanted Files" (NS_MAIN) as title, so as to get what
 41+ # category would be used on main namespace pages, for those tricky wikipedia
 42+ # admins who like to do {{#ifeq:{{NAMESPACE}}|foo|bar|....}}.
 43+ $catMessage = wfMessage( 'broken-file-category' )
 44+ ->title( Title::newFromText( "Wanted Files", NS_MAIN ) )
 45+ ->inContentLanguage();
 46+
 47+ if ( !$catMessage->isDisabled() ) {
 48+ $category = Title::makeTitleSafe( NS_CATEGORY, $catMessage->text() );
 49+ } else {
 50+ $category = false;
 51+ }
 52+
 53+ if ( $category ) {
 54+ return $this
 55+ ->msg( 'wantedfiletext-cat' )
 56+ ->params( $category->getFullText() )
 57+ ->parseAsBlock();
 58+ } else {
 59+ return $this
 60+ ->msg( 'wantedfiletext-nocat' )
 61+ ->parseAsBlock();
 62+ }
 63+ }
 64+
3965 /**
4066 * KLUGE: The results may contain false positives for files
4167 * that exist e.g. in a shared repo. Setting this at least
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -2219,6 +2219,8 @@
22202220
22212221 $1 is a page title",
22222222 'wantedfiles' => 'Name of special page displayed in [[Special:SpecialPages]] and title of [[Special:WantedFiles]].',
 2223+'wantedfiletext-cat' => 'Message displayed at top of [[special:WantedFiles]]. $1 contains the name of the tracking category for broken files (Including Category prefix). {{msg-mw|wantedfiletext-nocat}} is used if the tracking category is disabled.',
 2224+'wantedfiletext-nocat' => 'Message displayed at top of [[special:WantedFiles]] when broken file tracking category is disabled. See {{msg-mw|wantedfiletext-cat}}.',
22232225 'wantedtemplates' => 'The page name of [[Special:WantedTemplates]].',
22242226 'mostlinked' => 'Name of special page displayed in [[Special:SpecialPages]]',
22252227 'mostlinkedcategories' => 'Name of special page displayed in [[Special:SpecialPages]]',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2529,6 +2529,8 @@
25302530 'wantedpages-badtitle' => 'Invalid title in result set: $1',
25312531 'wantedfiles' => 'Wanted files',
25322532 'wantedfiles-summary' => '', # do not translate or duplicate this message to other languages
 2533+'wantedfiletext-cat' => 'The following images are used but do not exist. Images from foreign repositories may be listed despite existing. Any such false positives will be <del>struck out</del>. Additionally, pages that embed images that do not exist are listed in [[:$1]].',
 2534+'wantedfiletext-nocat' => 'The following images are used but do not exist. Images from foreign repositories may be listed despite existing. Any such false positives will be <del>struck out</del>.',
25332535 'wantedtemplates' => 'Wanted templates',
25342536 'wantedtemplates-summary' => '', # do not translate or duplicate this message to other languages
25352537 'mostlinked' => 'Most linked-to pages',

Follow-up revisions

RevisionCommit summaryAuthorDate
r107772r107770: Consistency tweak: Image -> Fileraymond13:03, 1 January 2012

Status & tagging log