Index: trunk/phase3/includes/Linker.php |
— | — | @@ -544,6 +544,15 @@ |
545 | 545 | } |
546 | 546 | } |
547 | 547 | |
| 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 | + |
548 | 557 | if ( isset( $fp['thumbnail'] ) || isset( $fp['manualthumb'] ) || isset( $fp['framed'] ) ) { |
549 | 558 | |
550 | 559 | # Create a thumbnail. Alignment depends on language |
— | — | @@ -634,12 +643,6 @@ |
635 | 644 | // Use image dimensions, don't scale |
636 | 645 | $thumb = $file->getUnscaledThumb( $page ); |
637 | 646 | } 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 | | - } |
644 | 647 | $thumb = $file->transform( $hp ); |
645 | 648 | } |
646 | 649 | |
— | — | @@ -1373,7 +1376,3 @@ |
1374 | 1377 | return $out; |
1375 | 1378 | } |
1376 | 1379 | } |
1377 | | - |
1378 | | - |
1379 | | - |
1380 | | - |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | * Strike the link to the redirect rather than using an asterisk in Special:Listredirects |
61 | 61 | * (bug 11355) Fix false positives in Safe Mode and other config detection |
62 | 62 | 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 |
63 | 64 | |
64 | 65 | === API changes in 1.12 === |
65 | 66 | |