height="-1" was getting into the <img> tags for (for example) very large PNGs not thumbnailed server-side due to the max image size limit
* Fix regression in Special:Undelete for revisions deleted under MediaWiki 1.4
with compression or legacy encoding
* (bug 6737) Fixes for MySQL 5 schema in strict mode
+* Approximate height for client-side scaling fallback instead of passing -1
+ into the HTML output.
== Languages updated ==
$url = $thumb->getUrl();
} else {
$error = htmlspecialchars( $img->getLastError() );
+ // Do client-side scaling...
+ $height = intval( $img->getHeight() * $width / $img->getWidth() );
}
}
} else {
if( $thumbUrl == '' ) {
// Couldn't generate thumbnail? Scale the image client-side.
$thumbUrl = $img->getViewURL();
+ if( $boxheight == -1 ) {
+ // Approximate...
+ $boxheight = intval( $height * $boxwidth / $width );
+ }
}
if ( $error ) {
$s .= htmlspecialchars( $error );