From 4b512f31d24a4c183ec1cd2904df19bd24d66401 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Tue, 7 Feb 2006 17:50:25 +0000 Subject: [PATCH] Fix for parser test error "Image link to nonexistent file (bug 1850)", both "good" and "bad" --- includes/Linker.php | 2 +- maintenance/parserTests.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index fb3deefb4c..0afae1caad 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -447,7 +447,7 @@ class Linker { global $wgContLang, $wgUser, $wgThumbLimits; $img = new Image( $nt ); - if ( !$img->allowInlineDisplay() ) { + if ( !$img->allowInlineDisplay() && $img->exists() ) { return $this->makeKnownLinkObj( $nt ); } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 7eb963547e..9164b10843 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -1,4 +1,4 @@ -# MediaWiki Parser test cases +# MediaWiki Parser test cases # Some taken from http://meta.wikimedia.org/wiki/Parser_testing # All (C) their respective authors and released under the GPL # @@ -670,9 +670,9 @@ BUG 289: literal double quote in bracketed URL !! test External links: invalid character !! input -[http://www.example.com test] +[http://www.example.com test] !! result -

[http://www.example.com test] +

[http://www.example.com test]

!! end -- 2.20.1