Merge "Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false;"
[lhc/web/wiklou.git] / includes / media / Bitmap.php
index e2dc68b..9f7a09c 100644 (file)
@@ -131,7 +131,7 @@ class BitmapHandler extends ImageHandler {
                        # The size of the image on the page
                        'clientWidth' => $params['width'],
                        'clientHeight' => $params['height'],
-                       # Comment as will be added to the EXIF of the thumbnail
+                       # Comment as will be added to the Exif of the thumbnail
                        'comment' => isset( $params['descriptionUrl'] ) ?
                                "File source: {$params['descriptionUrl']}" : '',
                        # Properties of the original image
@@ -398,7 +398,7 @@ class BitmapHandler extends ImageHandler {
                                        $im->sharpenImage( $radius, $sigma );
                                }
                                $im->setCompressionQuality( 80 );
-                       } elseif( $params['mimeType'] == 'image/png' ) {
+                       } elseif ( $params['mimeType'] == 'image/png' ) {
                                $im->setCompressionQuality( 95 );
                        } elseif ( $params['mimeType'] == 'image/gif' ) {
                                if ( $this->getImageArea( $image ) > $wgMaxAnimatedGifArea ) {
@@ -765,16 +765,16 @@ class BitmapHandler extends ImageHandler {
        public function rotate( $file, $params ) {
                global $wgImageMagickConvertCommand;
 
-               $rotation = ( $params[ 'rotation' ] + $this->getRotation( $file ) ) % 360;
+               $rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
                $scene = false;
 
                $scaler = self::getScalerType( null, false );
                switch ( $scaler ) {
                        case 'im':
                                $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " .
-                                       wfEscapeShellArg( $this->escapeMagickInput( $params[ 'srcPath' ], $scene ) ) .
+                                       wfEscapeShellArg( $this->escapeMagickInput( $params['srcPath'], $scene ) ) .
                                        " -rotate -$rotation " .
-                                       wfEscapeShellArg( $this->escapeMagickOutput( $params[ 'dstPath' ] ) ) . " 2>&1";
+                                       wfEscapeShellArg( $this->escapeMagickOutput( $params['dstPath'] ) ) . " 2>&1";
                                wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" );
                                wfProfileIn( 'convert' );
                                $retval = 0;