using token and username.
* (bug 23524) Api Modules as followup to bug 14473 (Add iwlinks table to
track inline interwiki link usage.
+* (bug 23834) Invalid "thumbwidth" and "thumbheight" in "imageinfo" query when
+ thumbnailing larger than original image
=== Languages updated in 1.17 ===
$mto = $file->transform( array( 'width' => $scale['width'], 'height' => $scale['height'] ) );
if ( $mto && !$mto->isError() ) {
$vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
- $vals['thumbwidth'] = intval( $mto->getWidth() );
- $vals['thumbheight'] = intval( $mto->getHeight() );
+
+ //bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
+ //thumbnail sizes for the thumbnail actual size
+ if ( $mto->getUrl() !== $file->getUrl() ) {
+ $vals['thumbwidth'] = intval( $mto->getWidth() );
+ $vals['thumbheight'] = intval( $mto->getHeight() );
+ } else {
+ $vals['thumbwidth'] = intval( $file->getWidth() );
+ $vals['thumbheight'] = intval( $file->getHeight() );
+ }
}
}
$vals['url'] = $file->getFullURL();
}
/**
- * Get an image size array like that returned by getimagesize(), or false if it
+ * Get an image size array like that returned by getImageSize(), or false if it
* can't be determined.
*
* @param $fileName String: The filename