From 9c08024f3e13ea6e48faa2490bf4f1a3e50790fe Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 11 Feb 2008 03:04:01 +0000 Subject: [PATCH] If a link is made to an old version of an image that doesn't exists, but a current version exists, blue link it. --- includes/Linker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Linker.php b/includes/Linker.php index 658b450a75..223cf3469a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -717,7 +717,8 @@ class Linker { global $wgEnableUploads; if( $title instanceof Title ) { wfProfileIn( __METHOD__ ); - if( $wgEnableUploads ) { + $currentFile = wfFindFile( $title ); + if( $wgEnableUploads && !$currentFile ) { $upload = SpecialPage::getTitleFor( 'Upload' ); if( $text == '' ) $text = htmlspecialchars( $title->getPrefixedText() ); -- 2.20.1