Index: trunk/phase3/includes/Linker.php |
— | — | @@ -377,6 +377,8 @@ |
378 | 378 | $url = $img->getViewURL(); |
379 | 379 | $prefix = $postfix = ''; |
380 | 380 | |
| 381 | + wfDebug( "makeImageLinkObj: '$width'x'$height'\n" ); |
| 382 | + |
381 | 383 | if ( 'center' == $align ) |
382 | 384 | { |
383 | 385 | $prefix = '<div class="center">'; |
— | — | @@ -421,13 +423,24 @@ |
422 | 424 | if ( $manual_thumb == '') { |
423 | 425 | $thumb = $img->getThumbnail( $width ); |
424 | 426 | if ( $thumb ) { |
425 | | - // $height = $thumb->height; |
426 | | - $height = floor($thumb->height * $width / $img->width); |
427 | | - $url = $thumb->getUrl( ); |
| 427 | + if( $width > $thumb->width ) { |
| 428 | + // Requested a display size larger than the actual image; |
| 429 | + // fake it up! |
| 430 | + $height = floor($thumb->height * $width / $thumb->width); |
| 431 | + wfDebug( "makeImageLinkObj: client-size height set to '$height'\n" ); |
| 432 | + } else { |
| 433 | + $height = $thumb->height; |
| 434 | + wfDebug( "makeImageLinkObj: thumb height set to '$height'\n" ); |
| 435 | + } |
| 436 | + $url = $thumb->getUrl(); |
428 | 437 | } |
429 | 438 | } |
| 439 | + } else { |
| 440 | + $width = $img->width; |
| 441 | + $height = $img->height; |
430 | 442 | } |
431 | 443 | |
| 444 | + wfDebug( "makeImageLinkObj2: '$width'x'$height'\n" ); |
432 | 445 | $u = $nt->escapeLocalURL(); |
433 | 446 | if ( $url == '' ) { |
434 | 447 | $s = $this->makeBrokenImageLinkObj( $img->getTitle() ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -464,9 +464,10 @@ |
465 | 465 | * (bug 923) Fix title and subtitle for rclinked special page |
466 | 466 | * (bug 2642) watchdetails message in several languages used <a></a> instead of [ ] |
467 | 467 | * (bug 2181) basic CSB language localisation by Tomasz G. Sienicki (thanks for the patch) |
468 | | -* (bug 2632) also adjust height when zooming an image by giving only width |
469 | 468 | * Fix correct use of escaping in edit toolbar bits |
470 | 469 | * Removed language conversion support from Icelandic |
| 470 | +* (bug 2632) Fix proportional image scaling, giving correct height |
| 471 | +* (bug 2640) Include width and height attributes on unscaled images |
471 | 472 | |
472 | 473 | |
473 | 474 | === Caveats === |