Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -1054,7 +1054,7 @@ |
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | /** |
1058 | | - * Get an image size array like that returned by getimagesize(), or false if it |
| 1058 | + * Get an image size array like that returned by getImageSize(), or false if it |
1059 | 1059 | * can't be determined. |
1060 | 1060 | * |
1061 | 1061 | * @param $fileName String: The filename |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -212,8 +212,16 @@ |
213 | 213 | $mto = $file->transform( array( 'width' => $scale['width'], 'height' => $scale['height'] ) ); |
214 | 214 | if ( $mto && !$mto->isError() ) { |
215 | 215 | $vals['thumburl'] = wfExpandUrl( $mto->getUrl() ); |
216 | | - $vals['thumbwidth'] = intval( $mto->getWidth() ); |
217 | | - $vals['thumbheight'] = intval( $mto->getHeight() ); |
| 216 | + |
| 217 | + //bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted |
| 218 | + //thumbnail sizes for the thumbnail actual size |
| 219 | + if ( $mto->getUrl() !== $file->getUrl() ) { |
| 220 | + $vals['thumbwidth'] = intval( $mto->getWidth() ); |
| 221 | + $vals['thumbheight'] = intval( $mto->getHeight() ); |
| 222 | + } else { |
| 223 | + $vals['thumbwidth'] = intval( $file->getWidth() ); |
| 224 | + $vals['thumbheight'] = intval( $file->getHeight() ); |
| 225 | + } |
218 | 226 | } |
219 | 227 | } |
220 | 228 | $vals['url'] = $file->getFullURL(); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -208,6 +208,8 @@ |
209 | 209 | using token and username. |
210 | 210 | * (bug 23524) Api Modules as followup to bug 14473 (Add iwlinks table to |
211 | 211 | track inline interwiki link usage. |
| 212 | +* (bug 23834) Invalid "thumbwidth" and "thumbheight" in "imageinfo" query when |
| 213 | + thumbnailing larger than original image |
212 | 214 | |
213 | 215 | === Languages updated in 1.17 === |
214 | 216 | |