fix some spacing
[lhc/web/wiklou.git] / includes / media / Bitmap.php
index 8a4b943..a8c1731 100644 (file)
@@ -75,7 +75,6 @@ class BitmapHandler extends ImageHandler {
                return true;
        }
 
-
        /**
         * Extracts the width/height if the image will be scaled before rotating
         *
@@ -100,7 +99,6 @@ class BitmapHandler extends ImageHandler {
                return array( $width, $height );
        }
 
-
        /**
         * Function that returns the number of pixels to be thumbnailed.
         * Intended for animated GIFs to multiply by the number of frames.
@@ -158,7 +156,6 @@ class BitmapHandler extends ImageHandler {
                        return $this->getClientScalingThumbnailImage( $image, $scalerParams );
                }
 
-
                if ( $scaler == 'client' ) {
                        # Client-side image scaling, use the source URL
                        # Using the destination URL in a TRANSFORM_LATER request would be incorrect
@@ -167,8 +164,11 @@ class BitmapHandler extends ImageHandler {
 
                if ( $flags & self::TRANSFORM_LATER ) {
                        wfDebug( __METHOD__ . ": Transforming later per flags.\n" );
-                       return new ThumbnailImage( $image, $dstUrl, $scalerParams['clientWidth'],
-                               $scalerParams['clientHeight'], false );
+                       $params = array(
+                               'width' => $scalerParams['clientWidth'],
+                               'height' => $scalerParams['clientHeight']
+                       );
+                       return new ThumbnailImage( $image, $dstUrl, false, $params );
                }
 
                # Try to make a target path for the thumbnail
@@ -220,8 +220,11 @@ class BitmapHandler extends ImageHandler {
                } elseif ( $mto ) {
                        return $mto;
                } else {
-                       return new ThumbnailImage( $image, $dstUrl, $scalerParams['clientWidth'],
-                               $scalerParams['clientHeight'], $dstPath );
+                       $params = array(
+                               'width' => $scalerParams['clientWidth'],
+                               'height' => $scalerParams['clientHeight']
+                       );
+                       return new ThumbnailImage( $image, $dstUrl, $dstPath, $params );
                }
        }
 
@@ -258,14 +261,17 @@ class BitmapHandler extends ImageHandler {
         * client side
         *
         * @param $image File File associated with this thumbnail
-        * @param $params array Array with scaler params
+        * @param $scalerParams array Array with scaler params
         * @return ThumbnailImage
         *
         * @todo fixme: no rotation support
         */
-       protected function getClientScalingThumbnailImage( $image, $params ) {
-               return new ThumbnailImage( $image, $image->getURL(),
-                       $params['clientWidth'], $params['clientHeight'], null );
+       protected function getClientScalingThumbnailImage( $image, $scalerParams ) {
+               $params = array(
+                       'width' => $scalerParams['clientWidth'],
+                       'height' => $scalerParams['clientHeight']
+               );
+               return new ThumbnailImage( $image, $image->getURL(), null, $params );
        }
 
        /**
@@ -332,7 +338,7 @@ class BitmapHandler extends ImageHandler {
                $rotation = $this->getRotation( $image );
                list( $width, $height ) = $this->extractPreRotationDimensions( $params, $rotation );
 
-               $cmd  =
+               $cmd =
                        wfEscapeShellArg( $wgImageMagickConvertCommand ) .
                        // Specify white background color, will be used for transparent images
                        // in Internet Explorer/Windows instead of default black.
@@ -614,7 +620,8 @@ class BitmapHandler extends ImageHandler {
         * to filter down to users.
         *
         * @param $path string The file path
-        * @param $scene string The scene specification, or false if there is none
+        * @param bool|string $scene The scene specification, or false if there is none
+        * @throws MWException
         * @return string
         */
        function escapeMagickInput( $path, $scene = false ) {
@@ -645,7 +652,8 @@ class BitmapHandler extends ImageHandler {
         * helper function for escapeMagickInput() and escapeMagickOutput().
         *
         * @param $path string The file path
-        * @param $scene string The scene specification, or false if there is none
+        * @param bool|string $scene The scene specification, or false if there is none
+        * @throws MWException
         * @return string
         */
        protected function escapeMagickPath( $path, $scene = false ) {