(bug 33447) Link to the broken image tracking category from Special:Wantedfiles
authorBrian Wolff <bawolff@users.mediawiki.org>
Sun, 1 Jan 2012 12:30:26 +0000 (12:30 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Sun, 1 Jan 2012 12:30:26 +0000 (12:30 +0000)
Also add a note about how if you use a foreign repo, you're going to get plenty false positives.

RELEASE-NOTES-1.19
includes/specials/SpecialWantedfiles.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 689ee6d..021db41 100644 (file)
@@ -110,6 +110,7 @@ production.
 * Added $wgSend404Code, true by default, which can be set to false to send a 
   200 status code instead of 404 for nonexistent articles.
 * (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
+* (bug 33447) Link to the broken image tracking category from Special:Wantedfiles
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if.
index 8a4fe56..ec0912d 100644 (file)
@@ -35,6 +35,32 @@ class WantedFilesPage extends WantedQueryPage {
                parent::__construct( $name );
        }
 
+       function getPageHeader() {
+               # Specifically setting to use "Wanted Files" (NS_MAIN) as title, so as to get what
+               # category would be used on main namespace pages, for those tricky wikipedia
+               # admins who like to do {{#ifeq:{{NAMESPACE}}|foo|bar|....}}.
+               $catMessage = wfMessage( 'broken-file-category' )
+                       ->title( Title::newFromText( "Wanted Files", NS_MAIN ) )
+                       ->inContentLanguage();
+               
+               if ( !$catMessage->isDisabled() ) {
+                       $category = Title::makeTitleSafe( NS_CATEGORY, $catMessage->text() );
+               } else {
+                       $category = false;
+               }
+
+               if ( $category ) {
+                       return $this
+                               ->msg( 'wantedfiletext-cat' )
+                               ->params( $category->getFullText() )
+                               ->parseAsBlock();
+               } else {
+                       return $this
+                               ->msg( 'wantedfiletext-nocat' )
+                               ->parseAsBlock();
+               }
+       }
+
        /**
         * KLUGE: The results may contain false positives for files
         * that exist e.g. in a shared repo.  Setting this at least
index 6148d92..ca647f7 100644 (file)
@@ -2529,6 +2529,8 @@ It now redirects to [[$2]].',
 'wantedpages-badtitle'            => 'Invalid title in result set: $1',
 'wantedfiles'                     => 'Wanted files',
 'wantedfiles-summary'             => '', # do not translate or duplicate this message to other languages
+'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]].',
+'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>.',
 'wantedtemplates'                 => 'Wanted templates',
 'wantedtemplates-summary'         => '', # do not translate or duplicate this message to other languages
 'mostlinked'                      => 'Most linked-to pages',
index 5b99d78..41c6255 100644 (file)
@@ -2219,6 +2219,8 @@ Possible alternatives to the word 'content' are 'subject matter' or 'wiki subjec
 
 $1 is a page title",
 'wantedfiles'             => 'Name of special page displayed in [[Special:SpecialPages]] and title of [[Special:WantedFiles]].',
+'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.',
+'wantedfiletext-nocat'      => 'Message displayed at top of [[special:WantedFiles]] when broken file tracking category is disabled. See {{msg-mw|wantedfiletext-cat}}.',
 'wantedtemplates'         => 'The page name of [[Special:WantedTemplates]].',
 'mostlinked'              => 'Name of special page displayed in [[Special:SpecialPages]]',
 'mostlinkedcategories'    => 'Name of special page displayed in [[Special:SpecialPages]]',
index 3fbf447..c8115d0 100644 (file)
@@ -1628,6 +1628,8 @@ $wgMessageStructure = array(
                'wantedpages-badtitle',
                'wantedfiles',
                'wantedfiles-summary',
+               'wantedfiletext-cat',
+               'wantedfiletext-nocat',
                'wantedtemplates',
                'wantedtemplates-summary',
                'mostlinked',