Merge "Revert "Enforce stricter slave lag limits for bot API requests""
[lhc/web/wiklou.git] / includes / media / FormatMetadata.php
index 17e3dda..5b57821 100644 (file)
@@ -117,9 +117,9 @@ class FormatMetadata extends ContextSource {
                                $type = 'ul'; // default unordered list.
                        }
 
-                       //This is done differently as the tag is an array.
+                       // This is done differently as the tag is an array.
                        if ( $tag == 'GPSTimeStamp' && count( $vals ) === 3 ) {
-                               //hour min sec array
+                               // hour min sec array
 
                                $h = explode( '/', $vals[0] );
                                $m = explode( '/', $vals[1] );
@@ -413,7 +413,7 @@ class FormatMetadata extends ContextSource {
                                                        'mode' => ( $val & bindec( '00011000' ) ) >> 3,
                                                        'function' => ( $val & bindec( '00100000' ) ) >> 5,
                                                        'redeye' => ( $val & bindec( '01000000' ) ) >> 6,
-//                                             'reserved' => ($val & bindec( '10000000' )) >> 7,
+//                                             'reserved' => ($val & bindec( '10000000' )) >> 7,
                                                );
                                                $flashMsgs = array();
                                                # We do not need to handle unknown values since all are used.
@@ -597,7 +597,7 @@ class FormatMetadata extends ContextSource {
                                                }
                                                break;
 
-                                       //The GPS...Ref values are kept for compatibility, probably won't be reached.
+                                       // The GPS...Ref values are kept for compatibility, probably won't be reached.
                                        case 'GPSLatitudeRef':
                                        case 'GPSDestLatitudeRef':
                                                switch ( $val ) {
@@ -730,7 +730,7 @@ class FormatMetadata extends ContextSource {
 
                                        case 'Software':
                                                if ( is_array( $val ) ) {
-                                                       //if its a software, version array.
+                                                       // if its a software, version array.
                                                        $val = $this->msg( 'exif-software-version-value', $val[0], $val[1] )->text();
                                                } else {
                                                        $val = $this->exifMsg( $tag, '', $val );
@@ -1169,7 +1169,7 @@ class FormatMetadata extends ContextSource {
                $lowLang = strtolower( $lang );
                $langName = Language::fetchLanguageName( $lowLang );
                if ( $langName === '' ) {
-                       //try just the base language name. (aka en-US -> en ).
+                       // try just the base language name. (aka en-US -> en ).
                        list( $langPrefix ) = explode( '-', $lowLang, 2 );
                        $langName = Language::fetchLanguageName( $langPrefix );
                        if ( $langName === '' ) {
@@ -1732,8 +1732,9 @@ class FormatMetadata extends ContextSource {
        }
 
        /**
-        * Turns an XMP-style multivalue array into a single value by dropping all but the first value.
-        * If the value is not a multivalue array (or a multivalue array inside a multilang array), it is returned unchanged.
+        * Turns an XMP-style multivalue array into a single value by dropping all but the first
+        * value. If the value is not a multivalue array (or a multivalue array inside a multilang
+        * array), it is returned unchanged.
         * See mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
         * @param mixed $value
         * @return mixed The value, or the first value if there were multiple ones
@@ -1742,7 +1743,8 @@ class FormatMetadata extends ContextSource {
        protected function resolveMultivalueValue( $value ) {
                if ( !is_array( $value ) ) {
                        return $value;
-               } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) { // if this is a multilang array, process fields separately
+               } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) {
+                       // if this is a multilang array, process fields separately
                        $newValue = array();
                        foreach ( $value as $k => $v ) {
                                $newValue[$k] = $this->resolveMultivalueValue( $v );