r12975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12974‎ | r12975 | r12976 >
Date:17:50, 7 February 2006
Author:magnus_manske
Status:old
Tags:
Comment:
Fix for parser test error "Image link to nonexistent file (bug 1850)", both "good"
and "bad"
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -1,4 +1,4 @@
2 -# MediaWiki Parser test cases
 2+# MediaWiki Parser test cases
33 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
44 # All (C) their respective authors and released under the GPL
55 #
@@ -670,9 +670,9 @@
671671 !! test
672672 External links: invalid character
673673 !! input
674 -[http://www.example.com test]
 674+[http://www.example.com test]
675675 !! result
676 -<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
 676+<p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
677677 </p>
678678 !! end
679679
Index: trunk/phase3/includes/Linker.php
@@ -447,7 +447,7 @@
448448 global $wgContLang, $wgUser, $wgThumbLimits;
449449
450450 $img = new Image( $nt );
451 - if ( !$img->allowInlineDisplay() ) {
 451+ if ( !$img->allowInlineDisplay() && $img->exists() ) {
452452 return $this->makeKnownLinkObj( $nt );
453453 }
454454

Follow-up revisions

RevisionCommit summaryAuthorDate
r12976(bug 1850) Image link to nonexistent file fixed.magnus_manske17:53, 7 February 2006
r65967Recovered parser test whose content got broken in r12975, functionality broke...platonides21:58, 5 May 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r11916* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]...vibber06:28, 3 December 2005
r11976* (bug 1850) Additional fixes so existing local and remote images...vibber07:08, 5 December 2005

Status & tagging log