* (bug 923) Fix title and subtitle for rclinked special page
* (bug 2642) watchdetails message in several languages used <a></a> instead of [ ]
* (bug 2181) basic CSB language localisation by Tomasz G. Sienicki (thanks for the patch)
-* (bug 2632) also adjust height when zooming an image by giving only width
* Fix correct use of escaping in edit toolbar bits
* Removed language conversion support from Icelandic
+* (bug 2632) Fix proportional image scaling, giving correct height
+* (bug 2640) Include width and height attributes on unscaled images
=== Caveats ===
$url = $img->getViewURL();
$prefix = $postfix = '';
+ wfDebug( "makeImageLinkObj: '$width'x'$height'\n" );
+
if ( 'center' == $align )
{
$prefix = '<div class="center">';
if ( $manual_thumb == '') {
$thumb = $img->getThumbnail( $width );
if ( $thumb ) {
- // $height = $thumb->height;
- $height = floor($thumb->height * $width / $img->width);
- $url = $thumb->getUrl( );
+ if( $width > $thumb->width ) {
+ // Requested a display size larger than the actual image;
+ // fake it up!
+ $height = floor($thumb->height * $width / $thumb->width);
+ wfDebug( "makeImageLinkObj: client-size height set to '$height'\n" );
+ } else {
+ $height = $thumb->height;
+ wfDebug( "makeImageLinkObj: thumb height set to '$height'\n" );
+ }
+ $url = $thumb->getUrl();
}
}
+ } else {
+ $width = $img->width;
+ $height = $img->height;
}
+ wfDebug( "makeImageLinkObj2: '$width'x'$height'\n" );
$u = $nt->escapeLocalURL();
if ( $url == '' ) {
$s = $this->makeBrokenImageLinkObj( $img->getTitle() );