r25917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25916‎ | r25917 | r25918 >
Date:14:30, 18 September 2007
Author:brion
Status:old
Tags:
Comment:
Revert r25916 -- breaks ability to blow up small images, without explanation. WTF?
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -544,15 +544,6 @@
545545 }
546546 }
547547
548 - if ( $file && $hp['width'] ) {
549 - # Do not present an image bigger than the source, for bitmap-style images
550 - # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
551 - $srcWidth = $file->getWidth( $page );
552 - if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
553 - $hp['width'] = $srcWidth;
554 - }
555 - }
556 -
557548 if ( isset( $fp['thumbnail'] ) || isset( $fp['manualthumb'] ) || isset( $fp['framed'] ) ) {
558549
559550 # Create a thumbnail. Alignment depends on language
@@ -643,6 +634,12 @@
644635 // Use image dimensions, don't scale
645636 $thumb = $file->getUnscaledThumb( $page );
646637 } else {
 638+ # Do not present an image bigger than the source, for bitmap-style images
 639+ # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
 640+ $srcWidth = $file->getWidth( $page );
 641+ if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
 642+ $hp['width'] = $srcWidth;
 643+ }
647644 $thumb = $file->transform( $hp );
648645 }
649646
@@ -1376,3 +1373,7 @@
13771374 return $out;
13781375 }
13791376 }
 1377+
 1378+
 1379+
 1380+
Index: trunk/phase3/RELEASE-NOTES
@@ -59,7 +59,6 @@
6060 * Strike the link to the redirect rather than using an asterisk in Special:Listredirects
6161 * (bug 11355) Fix false positives in Safe Mode and other config detection
6262 when boolean settings are disabled with 'Off' via php_admin_value/php_value
63 -* Do not present an image bigger than the source, for bitmap-style images
6463
6564 === API changes in 1.12 ===
6665

Follow-up revisions

RevisionCommit summaryAuthorDate
r25932Merged revisions 25861-25931 via svnmerge from...david06:43, 19 September 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r25916Moving code from Linker::makeThumbLink2 to Linker::makeImageLink2...raymond13:24, 18 September 2007

Status & tagging log