From: Tim Starling Date: Thu, 6 Nov 2008 20:59:34 +0000 (+0000) Subject: * Added the BitmapHandler_ClientOnly media handler, which allows server-side image... X-Git-Tag: 1.31.0-rc.0~44421 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=583127021b49e306dcb519767496b98e62a3ffff;p=lhc%2Fweb%2Fwiklou.git * Added the BitmapHandler_ClientOnly media handler, which allows server-side image scaling to be completely disabled for specific media types, via the $wgMediaHandlers configuration variable. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b7c22b0e12..3350e12f63 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -193,6 +193,9 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 16113) Show/hide for redirects in Special:NewPages * (bug 15903) Upload link was added to Nostalgia skin * (bug 15761) Add user toggle to omit diff after rollback +* Added the BitmapHandler_ClientOnly media handler, which allows server-side + image scaling to be completely disabled for specific media types, via the + $wgMediaHandlers configuration variable. === Bug fixes in 1.14 === diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 6154a8e740..c26916cf1a 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -384,6 +384,7 @@ $wgAutoloadLocalClasses = array( # includes/media 'BitmapHandler' => 'includes/media/Bitmap.php', + 'BitmapHandler_ClientOnly' => 'includes/media/Bitmap_ClientOnly.php', 'BmpHandler' => 'includes/media/BMP.php', 'DjVuHandler' => 'includes/media/DjVu.php', 'ImageHandler' => 'includes/media/Generic.php', diff --git a/includes/media/Bitmap_ClientOnly.php b/includes/media/Bitmap_ClientOnly.php new file mode 100644 index 0000000000..9801f9bee7 --- /dev/null +++ b/includes/media/Bitmap_ClientOnly.php @@ -0,0 +1,15 @@ +normaliseParams( $image, $params ) ) { + return new TransformParameterError( $params ); + } + return new ThumbnailImage( $image, $image->getURL(), $params['width'], + $params['height'], $image->getPath() ); + } +}