r11976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11975‎ | r11976 | r11977 >
Date:07:08, 5 December 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 1850) Additional fixes so existing local and remote images
get a blue link even if there's no local description page
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -295,6 +295,8 @@
296296 * Add createpage and createtalk permission keys, allowing a quick
297297 switch to disable page creation for anonymous users.
298298 * (bug 4167) Fix regression caused by patch for bug 153
 299+* (bug 1850) Additional fixes so existing local and remote images
 300+ get a blue link even if there's no local description page
299301
300302
301303 === Caveats ===
Index: trunk/phase3/includes/Parser.php
@@ -1464,6 +1464,15 @@
14651465 } elseif( $ns == NS_SPECIAL ) {
14661466 $s .= $prefix . $sk->makeKnownLinkObj( $nt, $text, '', $trail );
14671467 continue;
 1468+ } elseif( $ns == NS_IMAGE ) {
 1469+ $img = Image::newFromTitle( $nt );
 1470+ if( $img->exists() ) {
 1471+ // Force a blue link if the file exists; may be a remote
 1472+ // upload on the shared repository, and we want to see its
 1473+ // auto-generated page.
 1474+ $s .= $prefix . $sk->makeKnownLinkObj( $nt, $text, '', $trail );
 1475+ continue;
 1476+ }
14681477 }
14691478 $s .= $this->makeLinkHolder( $nt, $text, '', $trail, $prefix );
14701479 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r12975Fix for parser test error "Image link to nonexistent file (bug 1850)", both "...magnus_manske17:50, 7 February 2006
r12976(bug 1850) Image link to nonexistent file fixed.magnus_manske17:53, 7 February 2006

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

Status & tagging log