Replace in_array( array_keys( ... ) ) with array_key_exists( ... )
[lhc/web/wiklou.git] / includes / media / Exif.php
index bb5e344..b39e042 100644 (file)
@@ -81,9 +81,6 @@ class Exif {
         */
        private $mFilteredExifData;
 
-       /** @var array Filtered and formatted Exif data, see FormatMetadata::getFormattedData() */
-       private $mFormattedExifData;
-
        /** @var string The file being processed */
        private $file;
 
@@ -322,13 +319,13 @@ class Exif {
                $this->mFilteredExifData = array();
 
                foreach ( array_keys( $this->mRawExifData ) as $section ) {
-                       if ( !in_array( $section, array_keys( $this->mExifTags ) ) ) {
+                       if ( !array_key_exists( $section, $this->mExifTags ) ) {
                                $this->debug( $section, __FUNCTION__, "'$section' is not a valid Exif section" );
                                continue;
                        }
 
                        foreach ( array_keys( $this->mRawExifData[$section] ) as $tag ) {
-                               if ( !in_array( $tag, array_keys( $this->mExifTags[$section] ) ) ) {
+                               if ( !array_key_exists( $tag, $this->mExifTags[$section] ) ) {
                                        $this->debug( $tag, __FUNCTION__, "'$tag' is not a valid tag in '$section'" );
                                        continue;
                                }
@@ -553,18 +550,6 @@ class Exif {
                }
        }
 
-       /**
-        * Use FormatMetadata to create formatted values for display to user
-        * (is this ever used?)
-        *
-        * @deprecated since 1.18
-        */
-       function makeFormattedData() {
-               wfDeprecated( __METHOD__, '1.18' );
-               $this->mFormattedExifData = FormatMetadata::getFormattedData(
-                       $this->mFilteredExifData );
-       }
-
        /**#@-*/
 
        /**#@+
@@ -585,23 +570,6 @@ class Exif {
                return $this->mFilteredExifData;
        }
 
-       /**
-        * Get $this->mFormattedExifData
-        *
-        * This returns the data for display to user.
-        * Its unclear if this is ever used.
-        *
-        * @deprecated since 1.18
-        */
-       function getFormattedData() {
-               wfDeprecated( __METHOD__, '1.18' );
-               if ( !$this->mFormattedExifData ) {
-                       $this->makeFormattedData();
-               }
-
-               return $this->mFormattedExifData;
-       }
-
        /**#@-*/
 
        /**
@@ -861,13 +829,13 @@ class Exif {
                }
 
                if ( $action === true ) {
-                       wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)\n" );
+                       wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)" );
                } elseif ( $action === false ) {
-                       wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)\n" );
+                       wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)" );
                } elseif ( $action === null ) {
-                       wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)\n" );
+                       wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)" );
                } else {
-                       wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')\n" );
+                       wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')" );
                }
        }
 
@@ -883,9 +851,9 @@ class Exif {
                }
                $class = ucfirst( __CLASS__ );
                if ( $io ) {
-                       wfDebugLog( $this->log, "$class::$fname: begin processing: '{$this->basename}'\n" );
+                       wfDebugLog( $this->log, "$class::$fname: begin processing: '{$this->basename}'" );
                } else {
-                       wfDebugLog( $this->log, "$class::$fname: end processing: '{$this->basename}'\n" );
+                       wfDebugLog( $this->log, "$class::$fname: end processing: '{$this->basename}'" );
                }
        }
 }