Index: trunk/phase3/includes/Linker.php |
— | — | @@ -594,14 +594,14 @@ |
595 | 595 | if( $manual_title ) { |
596 | 596 | $manual_img = wfFindFile( $manual_title ); |
597 | 597 | if ( $manual_img ) { |
598 | | - $thumb = $manual_img->getUnscaledThumb(); |
| 598 | + $thumb = $manual_img->getUnscaledThumb( $hp ); |
599 | 599 | } else { |
600 | 600 | $exists = false; |
601 | 601 | } |
602 | 602 | } |
603 | 603 | } elseif ( isset( $fp['framed'] ) ) { |
604 | 604 | // Use image dimensions, don't scale |
605 | | - $thumb = $file->getUnscaledThumb( $page ); |
| 605 | + $thumb = $file->getUnscaledThumb( $hp ); |
606 | 606 | } else { |
607 | 607 | # Do not present an image bigger than the source, for bitmap-style images |
608 | 608 | # This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -438,20 +438,15 @@ |
439 | 439 | /** |
440 | 440 | * Get a ThumbnailImage which is the same size as the source |
441 | 441 | */ |
442 | | - function getUnscaledThumb( $page = false ) { |
| 442 | + function getUnscaledThumb( $handlerParams = array() ) { |
| 443 | + $hp =& $handlerParams; |
| 444 | + $page = isset( $hp['page'] ) ? $hp['page'] : false; |
443 | 445 | $width = $this->getWidth( $page ); |
444 | 446 | if ( !$width ) { |
445 | 447 | return $this->iconThumb(); |
446 | 448 | } |
447 | | - if ( $page ) { |
448 | | - $params = array( |
449 | | - 'page' => $page, |
450 | | - 'width' => $this->getWidth( $page ) |
451 | | - ); |
452 | | - } else { |
453 | | - $params = array( 'width' => $this->getWidth() ); |
454 | | - } |
455 | | - return $this->transform( $params ); |
| 449 | + $hp['width'] = $width; |
| 450 | + return $this->transform( $hp ); |
456 | 451 | } |
457 | 452 | |
458 | 453 | /** |