X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fmedia%2FFormatMetadata.php;h=0fee8cc00fc37dabe46f9ee684d83b642a856cff;hb=59ebff658ce912c1b0e7ef8d8f9bfec5a4e17b39;hp=2ae5af3dfc370b9d3589b2aca55e497808ba059d;hpb=4e90d55fdc9d31d93e24cf05687eb7d180806f44;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 2ae5af3dfc..0fee8cc00f 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -706,7 +706,7 @@ class FormatMetadata extends ContextSource { break; case 'GPSDOP': - // See http://en.wikipedia.org/wiki/Dilution_of_precision_(GPS) + // See https://en.wikipedia.org/wiki/Dilution_of_precision_(GPS) if ( $val <= 2 ) { $val = $this->exifMsg( $tag, 'excellent', $this->formatNum( $val ) ); } elseif ( $val <= 5 ) { @@ -1283,7 +1283,7 @@ class FormatMetadata extends ContextSource { */ private function gcd( $a, $b ) { /* - // http://en.wikipedia.org/wiki/Euclidean_algorithm + // https://en.wikipedia.org/wiki/Euclidean_algorithm // Recursive form would be: if( $b == 0 ) return $a; @@ -1575,7 +1575,6 @@ class FormatMetadata extends ContextSource { // If revision deleted, exit immediately if ( $file->isDeleted( File::DELETED_FILE ) ) { - return array(); } @@ -1733,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 @@ -1743,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 );