*
*/
function toHTML() {
- global $wgLang, $wgIgnoreImageErrors;
+ global $wgLang, $wgIgnoreImageErrors, $wgGenerateThumbnailOnParse;
$sk =& $this->getSkin();
$thumbhtml = '<div style="height: 152px;">'
. $sk->makeKnownLinkObj( $nt, htmlspecialchars( $nt->getText() ) ) . '</div>';
}
- else if( !( $thumb = $img->getThumbnail( 120, 120 ) ) ) {
+ else if( !( $thumb = $img->getThumbnail( 120, 120, $wgGenerateThumbnailOnParse ) ) ) {
# Error generating thumbnail.
$thumbhtml = '<div style="height: 152px;">'
. htmlspecialchars( $img->getLastError() ) . '</div>';
}
function openShowImage() {
- global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize;
+ global $wgOut, $wgUser, $wgImageLimits, $wgRequest;
+ global $wgUseImageResize, $wgGenerateThumbnailOnParse;
$full_url = $this->img->getURL();
$anchoropen = '';
}
if( $wgUseImageResize ) {
- $thumbnail = $this->img->getThumbnail( $width );
+ $thumbnail = $this->img->getThumbnail( $width, -1, $wgGenerateThumbnailOnParse );
if ( $thumbnail == null ) {
$url = $this->img->getViewURL();
} else {