jenkins-bot has submitted this change and it was merged.

Change subject: Add broken-file-category for file links inside <gallery/>
......................................................................


Add broken-file-category for file links inside <gallery/>

Bug: 50119
Change-Id: I7d06f48e53df43213bda52feec0d3f390e10f742
---
M includes/ImageGallery.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Brian Wolff: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php
index 43cf7f6..5b45404 100644
--- a/includes/ImageGallery.php
+++ b/includes/ImageGallery.php
@@ -286,6 +286,10 @@
                                # 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;">' .

-- 
To view, visit https://gerrit.wikimedia.org/r/70227
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d06f48e53df43213bda52feec0d3f390e10f742
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to