Merge "Added VirtualRESTServiceClient/VirtualRESTService classes"
[lhc/web/wiklou.git] / includes / media / ExifBitmap.php
index fe037b7..ae1ff9d 100644 (file)
@@ -80,7 +80,7 @@ class ExifBitmapHandler extends BitmapHandler {
        }
 
        /**
-        * @param $image
+        * @param File $image
         * @param array $metadata
         * @return bool|int
         */
@@ -169,12 +169,11 @@ class ExifBitmapHandler extends BitmapHandler {
         * @return array
         */
        function getImageSize( $image, $path ) {
-               global $wgEnableAutoRotation;
                $gis = parent::getImageSize( $image, $path );
 
                // Don't just call $image->getMetadata(); FSFile::getPropsFromPath() calls us with a bogus object.
                // This may mean we read EXIF data twice on initial upload.
-               if ( $wgEnableAutoRotation ) {
+               if ( BitmapHandler::autoRotateEnabled() ) {
                        $meta = $this->getMetadata( $image, $path );
                        $rotation = $this->getRotationForExif( $meta );
                } else {
@@ -199,12 +198,11 @@ class ExifBitmapHandler extends BitmapHandler {
         * the width and height we normally work with is logical, and will match
         * any produced output views.
         *
-        * @param $file File
+        * @param File $file
         * @return int 0, 90, 180 or 270
         */
        public function getRotation( $file ) {
-               global $wgEnableAutoRotation;
-               if ( !$wgEnableAutoRotation ) {
+               if ( !BitmapHandler::autoRotateEnabled() ) {
                        return 0;
                }