(bug 23816) Add tracking category for any page with a broken image.
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 20 Apr 2011 19:43:47 +0000 (19:43 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 20 Apr 2011 19:43:47 +0000 (19:43 +0000)
Note this considers a link to a non-existent image to be broken. A link
to an image that exists but does not have a handler is not considered broken.

RELEASE-NOTES
includes/parser/Parser.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 400ad59..02d66f4 100644 (file)
@@ -133,6 +133,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
 * Special:ListFiles is now transcludable.
 * (bug 13879) Special:Emailuser asks for suitable target user if called without.
 * (bug 16956) IPTC and XMP metadata now extracted from images
+* (bug 23816) A tracking category is now added for any pages with broken images.
 
 === Bug fixes in 1.18 ===
 * (bug 23119) WikiError class and subclasses are now marked as deprecated
index 92cff97..c3f6a39 100644 (file)
@@ -4810,6 +4810,10 @@ class Parser {
 
                list( $paramMap, $mwArray ) = $this->getImageParams( $handler );
 
+               if ( !$file ) {
+                       $this->addTrackingCategory( 'broken-file-category' );
+               }
+
                # Process the input parameters
                $caption = '';
                $params = array( 'frame' => array(), 'handler' => array(),
index 63fa804..fa49b1b 100644 (file)
@@ -749,6 +749,7 @@ XHTML id names.
 'listingcontinuesabbrev'         => 'cont.',
 'index-category'                 => 'Indexed pages',
 'noindex-category'               => 'Noindexed pages',
+'broken-file-category'           => 'Pages with broken file links',
 
 'linkprefix'        => '/^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD', # only translate this message to other languages if you have to change it
 'mainpagetext'      => "'''MediaWiki has been successfully installed.'''",
index a50b9bd..c74d0a1 100644 (file)
@@ -260,6 +260,7 @@ This is the toolbar: [[Image:Toolbar.png]]",
 See http://test.wikipedia.org/wiki/Category:Test_ko?uselang={{SUBPAGENAME}}, for example.',
 'index-category'                 => 'Name of the category where pages with the <nowiki>__INDEX__</nowiki> behaviour switch are listed. For description of this behaviour switch see [http://www.mediawiki.org/wiki/Help:Magic_words#Behavior_switches mediawiki].',
 'noindex-category'               => 'Name of the category where pages with the <nowiki>__NOINDEX__</nowiki> behaviour switch are listed. For description of this behaviour switch see [http://www.mediawiki.org/wiki/Help:Magic_words#Behavior_switches mediawiki].',
+'broken-file-category'           => 'Name of category where pages that embed files that do not exist ("broken images") are listed.',
 
 'linkprefix'        => '{{optional}}',
 'mainpagetext'      => 'Along with {{msg|mainpagedocfooter}}, the text you will see on the Main Page when your wiki is installed.',
index 1f7dc63..abdd76c 100644 (file)
@@ -157,6 +157,7 @@ $wgMessageStructure = array(
                'listingcontinuesabbrev',
                'index-category',
                'noindex-category',
+               'broken-file-category',
        ),
        'mainpage' => array(
                'linkprefix',