Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -193,6 +193,9 @@ |
194 | 194 | * (bug 16113) Show/hide for redirects in Special:NewPages |
195 | 195 | * (bug 15903) Upload link was added to Nostalgia skin |
196 | 196 | * (bug 15761) Add user toggle to omit diff after rollback |
| 197 | +* Added the BitmapHandler_ClientOnly media handler, which allows server-side |
| 198 | + image scaling to be completely disabled for specific media types, via the |
| 199 | + $wgMediaHandlers configuration variable. |
197 | 200 | |
198 | 201 | === Bug fixes in 1.14 === |
199 | 202 | |
Index: trunk/phase3/includes/media/Bitmap_ClientOnly.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class BitmapHandler_ClientOnly extends BitmapHandler { |
| 5 | + function normaliseParams( $image, &$params ) { |
| 6 | + return ImageHandler::normaliseParams( $image, $params ); |
| 7 | + } |
| 8 | + |
| 9 | + function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) { |
| 10 | + if ( !$this->normaliseParams( $image, $params ) ) { |
| 11 | + return new TransformParameterError( $params ); |
| 12 | + } |
| 13 | + return new ThumbnailImage( $image, $image->getURL(), $params['width'], |
| 14 | + $params['height'], $image->getPath() ); |
| 15 | + } |
| 16 | +} |
Property changes on: trunk/phase3/includes/media/Bitmap_ClientOnly.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -384,6 +384,7 @@ |
385 | 385 | |
386 | 386 | # includes/media |
387 | 387 | 'BitmapHandler' => 'includes/media/Bitmap.php', |
| 388 | + 'BitmapHandler_ClientOnly' => 'includes/media/Bitmap_ClientOnly.php', |
388 | 389 | 'BmpHandler' => 'includes/media/BMP.php', |
389 | 390 | 'DjVuHandler' => 'includes/media/DjVu.php', |
390 | 391 | 'ImageHandler' => 'includes/media/Generic.php', |