From: Aaron Schulz Date: Mon, 11 Feb 2008 03:04:01 +0000 (+0000) Subject: If a link is made to an old version of an image that doesn't exists, but a current... X-Git-Tag: 1.31.0-rc.0~49524 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=9c08024f3e13ea6e48faa2490bf4f1a3e50790fe;p=lhc%2Fweb%2Fwiklou.git If a link is made to an old version of an image that doesn't exists, but a current version exists, blue link it. --- 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() );