Index: trunk/phase3/includes/Linker.php |
— | — | @@ -537,6 +537,8 @@ |
538 | 538 | $url = $thumb->getUrl(); |
539 | 539 | } else { |
540 | 540 | $error = htmlspecialchars( $img->getLastError() ); |
| 541 | + // Do client-side scaling... |
| 542 | + $height = intval( $img->getHeight() * $width / $img->getWidth() ); |
541 | 543 | } |
542 | 544 | } |
543 | 545 | } else { |
— | — | @@ -633,6 +635,10 @@ |
634 | 636 | if( $thumbUrl == '' ) { |
635 | 637 | // Couldn't generate thumbnail? Scale the image client-side. |
636 | 638 | $thumbUrl = $img->getViewURL(); |
| 639 | + if( $boxheight == -1 ) { |
| 640 | + // Approximate... |
| 641 | + $boxheight = intval( $height * $boxwidth / $width ); |
| 642 | + } |
637 | 643 | } |
638 | 644 | if ( $error ) { |
639 | 645 | $s .= htmlspecialchars( $error ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -160,6 +160,8 @@ |
161 | 161 | * Fix regression in Special:Undelete for revisions deleted under MediaWiki 1.4 |
162 | 162 | with compression or legacy encoding |
163 | 163 | * (bug 6737) Fixes for MySQL 5 schema in strict mode |
| 164 | +* Approximate height for client-side scaling fallback instead of passing -1 |
| 165 | + into the HTML output. |
164 | 166 | |
165 | 167 | |
166 | 168 | == Languages updated == |