From 587645f641d120b3665fbe41b7121f12f0634df3 Mon Sep 17 00:00:00 2001 From: Purodha B Blissenbach Date: Mon, 25 May 2009 13:42:47 +0000 Subject: [PATCH] Fix r50972 --- includes/ImagePage.php | 16 +++++++++------- languages/messages/MessagesEn.php | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 0bdc3da8af..04fdd46c00 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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( '
' . $nofile . '
' ); + $wgOut->addHTML( '' ); } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 56695dc794..cf9c88963f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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', -- 2.20.1