Merge "Add broken-file-category for file links inside <gallery/>"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 26 Jun 2013 20:51:41 +0000 (20:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Jun 2013 20:51:41 +0000 (20:51 +0000)
includes/ImageGallery.php

index 43cf7f6..5b45404 100644 (file)
@@ -286,6 +286,10 @@ class ImageGallery {
                                # We're dealing with a non-image, spit out the name and be done with it.
                                $thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">'
                                        . htmlspecialchars( $nt->getText() ) . '</div>';
+
+                               if ( $this->mParser instanceof Parser ) {
+                                       $this->mParser->addTrackingCategory( 'broken-file-category' );
+                               }
                        } elseif ( $this->mHideBadImages && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) ) {
                                # The image is blacklisted, just show it as a text link.
                                $thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">' .