if( $manual_title ) {
$manual_img = wfFindFile( $manual_title );
if ( $manual_img ) {
- $thumb = $manual_img->getUnscaledThumb();
+ $thumb = $manual_img->getUnscaledThumb( $hp );
} else {
$exists = false;
}
}
} elseif ( isset( $fp['framed'] ) ) {
// Use image dimensions, don't scale
- $thumb = $file->getUnscaledThumb( $page );
+ $thumb = $file->getUnscaledThumb( $hp );
} else {
# Do not present an image bigger than the source, for bitmap-style images
# This is a hack to maintain compatibility with arbitrary pre-1.10 behaviour
/**
* Get a ThumbnailImage which is the same size as the source
*/
- function getUnscaledThumb( $page = false ) {
+ function getUnscaledThumb( $handlerParams = array() ) {
+ $hp =& $handlerParams;
+ $page = isset( $hp['page'] ) ? $hp['page'] : false;
$width = $this->getWidth( $page );
if ( !$width ) {
return $this->iconThumb();
}
- if ( $page ) {
- $params = array(
- 'page' => $page,
- 'width' => $this->getWidth( $page )
- );
- } else {
- $params = array( 'width' => $this->getWidth() );
- }
- return $this->transform( $params );
+ $hp['width'] = $width;
+ return $this->transform( $hp );
}
/**