From d05dde4329a73c461cf903be38bb81ff10f63a23 Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Thu, 8 Jan 2015 12:53:33 -0500 Subject: [PATCH] Render bad images in wikitext as links In galleries, bad images are rendered as links. This causes the same behavior to occur in wikitext, rather than the current behavior of not rendering anything. Change-Id: I1a074bff7cb661b5b4e6db9503eb6a5de702ee2f --- includes/parser/Parser.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 01f6b804ad..aca32ed569 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2296,13 +2296,9 @@ class Parser { # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them $s .= $prefix . $this->armorLinks( $this->makeImage( $nt, $text, $holders ) ) . $trail; - } else { - $s .= $prefix . $trail; + continue; } - continue; - } - - if ( $ns == NS_CATEGORY ) { + } elseif ( $ns == NS_CATEGORY ) { $s = rtrim( $s . "\n" ); # bug 87 if ( $wasblank ) { -- 2.20.1