If a link is made to an old version of an image that doesn't exists, but a current...
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 11 Feb 2008 03:04:01 +0000 (03:04 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 11 Feb 2008 03:04:01 +0000 (03:04 +0000)
includes/Linker.php

index 658b450..223cf34 100644 (file)
@@ -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() );