* (bug 3448) Set page_len on undelete
* (bug 3405) Don't use raw letters as aliases of MSGNW: and SUBST:
* (bug 2800) Don't scale up small images on |thumb| without explicit size
+* Use the real file link instead of the default-size rasterized version for
+ large SVG images on image description page
+* Include the file name/type/size line for non-resized images
=== Caveats ===
global $wgOut, $wgUser, $wgImageLimits, $wgRequest,
$wgUseImageResize, $wgRepositoryBaseUrl,
$wgUseExternalEditor, $wgServer, $wgFetchCommonsDescriptions;
- $full_url = $this->img->getViewURL();
+ $full_url = $this->img->getURL();
$anchoropen = '';
$anchorclose = '';
if( $wgUseImageResize ) {
$thumbnail = $this->img->getThumbnail( $width );
if ( $thumbnail == null ) {
- $url = $full_url;
+ $url = $img->getViewURL();
} else {
- $url = $thumbnail->getUrl();
+ $url = $thumbnail->getURL();
}
} else {
# No resize ability? Show the full image, but scale
# it down in the browser so it fits on the page.
- $url = $full_url;
+ $url = $img->getViewURL();
}
$anchoropen = "<a href=\"{$full_url}\">";
- $anchorclose = "</a><br />\n$anchoropen{$msg}</a>";
+ $anchorclose = "</a><br />";
+ if( $this->img->mustRender() ) {
+ $showLink = true;
+ } else {
+ $anchorclose .= "\n$anchoropen{$msg}</a>";
+ }
} else {
- $url = $full_url;
- $showLink = $this->img->mustRender();
+ $url = $this->img->getViewURL();
+ $showLink = true;
}
$wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
"<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
$icon->toHtml() .
'</a></div>' );
}
-
+
$showLink = true;
}
$info = wfMsg( 'fileinfo',
ceil($this->img->getSize()/1024.0),
$this->img->getMimeType() );
-
+
if (!$this->img->isSafeFile()) {
$warning = wfMsg( 'mediawarning' );
$wgOut->addWikiText( <<<END