r43266 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43265‎ | r43266 | r43267 >
Date:20:59, 6 November 2008
Author:tstarling
Status:old
Tags:
Comment:
* 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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)
  • /trunk/phase3/includes/media/Bitmap_ClientOnly.php (added) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -193,6 +193,9 @@
194194 * (bug 16113) Show/hide for redirects in Special:NewPages
195195 * (bug 15903) Upload link was added to Nostalgia skin
196196 * (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.
197200
198201 === Bug fixes in 1.14 ===
199202
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
117 + native
Index: trunk/phase3/includes/AutoLoader.php
@@ -384,6 +384,7 @@
385385
386386 # includes/media
387387 'BitmapHandler' => 'includes/media/Bitmap.php',
 388+ 'BitmapHandler_ClientOnly' => 'includes/media/Bitmap_ClientOnly.php',
388389 'BmpHandler' => 'includes/media/BMP.php',
389390 'DjVuHandler' => 'includes/media/DjVu.php',
390391 'ImageHandler' => 'includes/media/Generic.php',

Status & tagging log