* (bug 6039) Update for Portuguese localisation (pt)
* (bug 764) Add CREATE TEMPORARY TABLES to default database permissions
* Big update to Swedish localisation (sv)
+* Use appropriate HTML functions to create the tool links on image pages, so they don't
+ look garbled when tidy isn't on
== Compatibility ==
return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) );
}
-
- function uploadLinksBox()
- {
+ /**
+ * Print out the various links at the bottom of the image page, e.g. reupload,
+ * external editing (and instructions link) etc.
+ */
+ function uploadLinksBox() {
global $wgUser, $wgOut;
- if ($this->img->fromSharedDirectory)
+ if( $this->img->fromSharedDirectory )
return;
$sk = $wgUser->getSkin();
- $wgOut->addHTML( '<br /><ul>' );
+
+ $wgOut->addHtml( '<br /><ul>' );
+
+ # "Upload a new version of this file" link
if( $wgUser->isAllowed( 'reupload' ) ) {
- $wgOut->addWikiText( "<li>\n<div>". wfMsg( 'uploadnewversion', $this->getUploadUrl() ) ."</div>\n</li>\n" );
- }
- $wgOut->addHTML( '<li>' );
- $wgOut->addHTML( $sk->makeKnownLinkObj( $this->mTitle,
- wfMsg( 'edit-externally' ), "action=edit&externaledit=true&mode=file" ) );
- $wgOut->addWikiText( '<div>' . wfMsg('edit-externally-help') . '</div>' );
- $wgOut->addHTML( '</li></ul>' );
+ $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion' ) );
+ $wgOut->addHtml( "<li><div>{$ulink}</div></li>" );
+ }
+
+ # External editing link
+ $elink = $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
+ $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
+
+ $wgOut->addHtml( '</ul>' );
}
function closeShowImage()
'shareddescriptionfollows' => '-',
'noimage' => 'No file by this name exists, you can $1.',
'noimage-linktext' => 'upload it',
-'uploadnewversion' => '[$1 Upload a new version of this file]',
+'uploadnewversion' => 'Upload a new version of this file',
# Mime search
#