r9888 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9887‎ | r9888 | r9889 >
Date:00:15, 4 July 2005
Author:hashar
Status:old
Tags:
Comment:
Fixes bug #2632 : new image height when zooming without using "thumb" was not computed.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -418,10 +418,11 @@
419419 if ( $height !== false && ( $img->getHeight() * $width / $img->getWidth() > $height ) ) {
420420 $width = $img->getWidth() * $height / $img->getHeight();
421421 }
422 - if ( '' == $manual_thumb ) {
 422+ if ( $manual_thumb == '') {
423423 $thumb = $img->getThumbnail( $width );
424424 if ( $thumb ) {
425 - $height = $thumb->height;
 425+ // $height = $thumb->height;
 426+ $height = floor($thumb->height * $width / $img->width);
426427 $url = $thumb->getUrl( );
427428 }
428429 }
Index: trunk/phase3/RELEASE-NOTES
@@ -462,7 +462,9 @@
463463 * (bug 923) Fix title and subtitle for rclinked special page
464464 * (bug 2642) watchdetails message in several languages used <a></a> instead of [ ]
465465 * (bug 2181) basic CSB language localisation by Tomasz G. Sienicki (thanks for the patch)
 466+* (bug 2632) also adjust height when zooming an image by giving only width
466467
 468+
467469 === Caveats ===
468470
469471 Some output, particularly involving user-supplied inline HTML, may not

Follow-up revisions

RevisionCommit summaryAuthorDate
r9905* (bug 2632) Fix proportional image scaling, giving correct height...vibber19:20, 4 July 2005

Status & tagging log