Bug 18784 - Internal links like [[File:Foo|caption]] should read 'caption', not ...
authorConrad Irwin <conrad@users.mediawiki.org>
Mon, 1 Feb 2010 20:43:24 +0000 (20:43 +0000)
committerConrad Irwin <conrad@users.mediawiki.org>
Mon, 1 Feb 2010 20:43:24 +0000 (20:43 +0000)
RELEASE-NOTES
includes/Linker.php

index a19ac2d..4e9f643 100644 (file)
@@ -730,6 +730,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 21870) No longer include Google logo from an external server on wiki error.
 * (bug 22181) Do not truncate if the ellipsis actually make the string longer
 * (bug 16039) Text disappearing after a bad image
+* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image
 
 == API changes in 1.16 ==
 
index 0183c4b..a89b81b 100644 (file)
@@ -521,7 +521,7 @@ class Linker {
                }
 
                if ( !$thumb ) {
-                       $s = $this->makeBrokenImageLinkObj( $title, '', '', '', '', $time==true );
+                       $s = $this->makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time==true );
                } else {
                        $params = array(
                                'alt' => $fp['alt'],
@@ -629,7 +629,7 @@ class Linker {
 
                $s = "<div class=\"thumb t{$fp['align']}\"><div class=\"thumbinner\" style=\"width:{$outerWidth}px;\">";
                if( !$exists ) {
-                       $s .= $this->makeBrokenImageLinkObj( $title, '', '', '', '', $time==true );
+                       $s .= $this->makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time==true );
                        $zoomicon = '';
                } elseif ( !$thumb ) {
                        $s .= htmlspecialchars( wfMsg( 'thumbnail_error', '' ) );