* Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css
* (bug 6434) Allow customisation of submit button text on Special:Export
* (bug 6314) Add user tool links on page histories
+* Fix display of file-type icons in galleries when $wgIgnoreImageErrors is off
+
== Compatibility ==
* provide access to the actual file, the real size of the thumb,
* and can produce a convenient <img> tag for you.
*
+ * For non-image formats, this may return a filetype-specific icon.
+ *
* @param integer $width maximum width of the generated thumbnail
* @param integer $height maximum height of the image (optional)
* @return ThumbnailImage or null on failure
if ($this->canRender()) {
if ( $width > $this->width * $height / $this->height )
$width = wfFitBoxWidth( $this->width, $this->height, $height );
- $thumb = $this->renderThumb( $width );
+ return $this->renderThumb( $width );
+ } else {
+ // not a bitmap or renderable image, don't try.
+ return $this->iconThumb();
}
- else $thumb= NULL; #not a bitmap or renderable image, don't try.
-
- return $thumb;
}
/**
$s .= ($i%4==0) ? '<tr>' : '';
$thumb = $img->getThumbnail( 120, 120 );
- if ( !$thumb && $wgIgnoreImageErrors ) {
- $thumb = $img->iconThumb();
- }
if ( $thumb ) {
$vpad = floor( ( 150 - $thumb->height ) /2 ) - 2;
$s .= '<td><div class="gallerybox">' . '<div class="thumb" style="padding: ' . $vpad . 'px 0;">';