r61816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61815‎ | r61816 | r61817 >
Date:20:43, 1 February 2010
Author:conrad
Status:ok (Comments)
Tags:
Comment:
Bug 18784 - Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -521,7 +521,7 @@
522522 }
523523
524524 if ( !$thumb ) {
525 - $s = $this->makeBrokenImageLinkObj( $title, '', '', '', '', $time==true );
 525+ $s = $this->makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time==true );
526526 } else {
527527 $params = array(
528528 'alt' => $fp['alt'],
@@ -629,7 +629,7 @@
630630
631631 $s = "<div class=\"thumb t{$fp['align']}\"><div class=\"thumbinner\" style=\"width:{$outerWidth}px;\">";
632632 if( !$exists ) {
633 - $s .= $this->makeBrokenImageLinkObj( $title, '', '', '', '', $time==true );
 633+ $s .= $this->makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time==true );
634634 $zoomicon = '';
635635 } elseif ( !$thumb ) {
636636 $s .= htmlspecialchars( wfMsg( 'thumbnail_error', '' ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -730,6 +730,7 @@
731731 * (bug 21870) No longer include Google logo from an external server on wiki error.
732732 * (bug 22181) Do not truncate if the ellipsis actually make the string longer
733733 * (bug 16039) Text disappearing after a bad image
 734+* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image
734735
735736 == API changes in 1.16 ==
736737

Follow-up revisions

RevisionCommit summaryAuthorDate
r61821Fix parser test that I broke with r61816conrad21:36, 1 February 2010
r61855Add a parser test for r61816conrad15:03, 2 February 2010

Comments

#Comment by Platonides (talk | contribs)   20:53, 1 February 2010

Parser tests, please.

#Comment by MaxSem (talk | contribs)   20:57, 1 February 2010

Running test Image caption containing another image... FAILED! Running test <references> after <gallery> (bug 6164)... FAILED!

#Comment by MaxSem (talk | contribs)   20:59, 1 February 2010

Meh.

Running test Image caption containing another image... FAILED!

Running test <references> after <gallery> (bug 6164)... FAILED!

#Comment by OverlordQ (talk | contribs)   21:15, 1 February 2010

Second one was broken by r61777

#Comment by Bryan (talk | contribs)   14:36, 2 February 2010

This also needs a specific parser test for this bug.

#Comment by Simetrical (talk | contribs)   17:39, 2 February 2010

Why should [[File:Foo|Bar]] with a broken link be consistent with [[Foo|Bar]], rather than with [[File:Foo|Bar]] with a working link? I'd expect the latter.

#Comment by Conrad.Irwin (talk | contribs)   19:54, 12 February 2010

The parser tests have been fixed, bugzilla:18784 contains some comments about further work.

Status & tagging log