Fix r50972
authorPurodha B Blissenbach <purodha@users.mediawiki.org>
Mon, 25 May 2009 13:42:47 +0000 (13:42 +0000)
committerPurodha B Blissenbach <purodha@users.mediawiki.org>
Mon, 25 May 2009 13:42:47 +0000 (13:42 +0000)
includes/ImagePage.php
languages/messages/MessagesEn.php

index 0bdc3da..04fdd46 100644 (file)
@@ -469,17 +469,19 @@ EOT
                        }
                } else {
                        # Image does not exist
-                       $nofile = wfMsgHtml( 'filepage-nofile' );
                        if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
                                // Only show an upload link if the user can upload
-                               $nofile .= ' '.$sk->makeKnownLinkObj(
-                                       SpecialPage::getTitleFor( 'Upload' ),
-                                       wfMsgHtml('filepage-nofile-link'),
-                                       'wpDestFile=' . urlencode( $this->displayImg->getName() )
-                               );
+                               $uploadTitle = SpecialPage::getTitleFor( 'Upload' );
+                               $nofile = wfMsgHtml('filepage-nofile-link',
+                                       $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) )
+                                       );
+                       }
+                       else
+                       {
+                               $nofile = wfMsgHtml( 'filepage-nofile' );
                        }
                        $wgOut->setRobotPolicy( 'noindex,nofollow' );
-                       $wgOut->addHTML( '<div id="mw-imagepage-nofile">' . $nofile . '</div>' );
+                       $wgOut->addHTML( '<div id="mw-imagepage-nofile" class="plainlinks">' . $nofile . '</div>' );
                }
        }
 
index 56695dc..cf9c889 100644 (file)
@@ -1998,8 +1998,8 @@ Please see the [$2 file description page] for further information.',
 'sharedupload-desc-here'    => 'This file is from $1 and may be used by other projects.
 The description on its [$2 file description page] there is shown below.',
 'shareddescriptionfollows'  => '-', # do not translate or duplicate this message to other languages
-'filepage-nofile'              => 'No file by this name exists, but',
-'filepage-nofile-link'         => 'you can upload it.',
+'filepage-nofile'              => 'No file by this name exists.',
+'filepage-nofile-link'         => 'No file by this name exists, but you can [$1 upload it].',
 'uploadnewversion-linktext' => 'Upload a new version of this file',
 'shared-repo-from'          => 'from $1',
 'shared-repo'               => 'a shared repository',