Matmarex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/70227
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/27/70227/1
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: newchange
Gerrit-Change-Id: I7d06f48e53df43213bda52feec0d3f390e10f742
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits