From 472c3267fe16ecbe16c04115544379b9fbd692c8 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 1 Feb 2010 20:43:24 +0000 Subject: [PATCH] Bug 18784 - Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image --- RELEASE-NOTES | 1 + includes/Linker.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a19ac2d937..4e9f643b8d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Linker.php b/includes/Linker.php index 0183c4b506..a89b81bf97 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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 = "
"; if( !$exists ) { - $s .= $this->makeBrokenImageLinkObj( $title, '', '', '', '', $time==true ); + $s .= $this->makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time==true ); $zoomicon = ''; } elseif ( !$thumb ) { $s .= htmlspecialchars( wfMsg( 'thumbnail_error', '' ) ); -- 2.20.1