Fix for parser test error "Image link to nonexistent file (bug 1850)", both "good"
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Tue, 7 Feb 2006 17:50:25 +0000 (17:50 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Tue, 7 Feb 2006 17:50:25 +0000 (17:50 +0000)
 and "bad"

includes/Linker.php
maintenance/parserTests.txt

index fb3deef..0afae1c 100644 (file)
@@ -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 );
                }
 
index 7eb9635..9164b10 100644 (file)
@@ -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\0 test]
+[http://www.example.com  test]
 !! result
-<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a>\0 test]
+<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a>  test]
 </p>
 !! end