}
} 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>' );
}
}
'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',