Merge "Fix jQuery compatibility issues in jquery.color.js"
[lhc/web/wiklou.git] / includes / media / ExifBitmap.php
index 0a14ca8..4bbafc1 100644 (file)
@@ -79,6 +79,11 @@ class ExifBitmapHandler extends BitmapHandler {
                return $metadata;
        }
 
+       /**
+        * @param $image
+        * @param array $metadata
+        * @return bool|int
+        */
        function isMetadataValid( $image, $metadata ) {
                global $wgShowEXIF;
                if ( !$wgShowEXIF ) {
@@ -119,7 +124,7 @@ class ExifBitmapHandler extends BitmapHandler {
        }
 
        /**
-        * @param $image File
+        * @param File $image
         * @return array|bool
         */
        function formatMetadata( $image ) {
@@ -164,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 {
@@ -198,8 +202,7 @@ class ExifBitmapHandler extends BitmapHandler {
         * @return int 0, 90, 180 or 270
         */
        public function getRotation( $file ) {
-               global $wgEnableAutoRotation;
-               if ( !$wgEnableAutoRotation ) {
+               if ( !BitmapHandler::autoRotateEnabled() ) {
                        return 0;
                }
 
@@ -214,8 +217,7 @@ class ExifBitmapHandler extends BitmapHandler {
         *
         * @param string $data
         * @return int 0, 90, 180 or 270
-        * @todo FIXME orientation can include flipping as well; see if this is an
-        * issue!
+        * @todo FIXME: Orientation can include flipping as well; see if this is an issue!
         */
        protected function getRotationForExif( $data ) {
                if ( !$data ) {