Wikia code/includes/media/Bitmap.php
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.42.1. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\media\Bitmap.php 2011-07-18 22:31:07.714843800 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\media\Bitmap.php 2011-08-17 15:28:14.600585900 +0100
@@ -9,7 +9,7 @@
*/
class BitmapHandler extends ImageHandler {
function normaliseParams( $image, &$params ) {
- global $wgMaxImageArea;
+ global $wgMaxImageArea, $wgMaxThumbnailArea;
if ( !parent::normaliseParams( $image, $params ) ) {
return false;
}
@@ -34,7 +34,13 @@
if ( $params['physicalWidth'] >= $srcWidth ) {
$params['physicalWidth'] = $srcWidth;
$params['physicalHeight'] = $srcHeight;
- return true;
+ }
+
+ # Same as srcWidth * srcHeight above but:
+ # - no free pass for jpeg
+ # - thumbs should be smaller
+ if ( $params['physicalWidth'] * $params['physicalHeight'] > $wgMaxThumbnailArea ) {
+ return false;
}
return true;