From 49ae06784186f6124e0e25296acbc95bd75c52b8 Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Mon, 24 Jun 2013 20:38:48 +0200 Subject: [PATCH] Add broken-file-category for file links inside Bug: 50119 Change-Id: I7d06f48e53df43213bda52feec0d3f390e10f742 --- includes/ImageGallery.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 43cf7f6c6a..5b45404065 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -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" . '
' . htmlspecialchars( $nt->getText() ) . '
'; + + 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" . '
' . -- 2.20.1