From: Jackmcbarn Date: Thu, 8 Jan 2015 17:53:33 +0000 (-0500) Subject: Render bad images in wikitext as links X-Git-Tag: 1.31.0-rc.0~6579 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=d05dde4329a73c461cf903be38bb81ff10f63a23;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {