X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fmedia%2FFormatMetadata.php;h=f2372874baf0fe34202fd2b47902d033b2eb9f36;hp=78b029693ca6b87c027dc4a0f8a1828c70f6227e;hb=c584722cc2e3d33edae58d46c2149063b3fc6d72;hpb=bdfe02223205923d923923dd420ba0dd863cd0fe diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 78b029693c..f2372874ba 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -24,6 +24,7 @@ * @see http://exif.org/Exif2-2.PDF The Exif 2.2 specification * @file */ +use Wikimedia\Timestamp\TimestampException; /** * Format Image metadata values into a human readable form. @@ -102,7 +103,6 @@ class FormatMetadata extends ContextSource { unset( $tags['ResolutionUnit'] ); foreach ( $tags as $tag => &$vals ) { - // This seems ugly to wrap non-array's in an array just to unwrap again, // especially when most of the time it is not an array if ( !is_array( $tags[$tag] ) ) { @@ -165,7 +165,6 @@ class FormatMetadata extends ContextSource { } foreach ( $vals as &$val ) { - switch ( $tag ) { case 'Compression': switch ( $val ) { @@ -866,6 +865,7 @@ class FormatMetadata extends ContextSource { // are included here as we really don't want // commas inserted. case 'ImageDescription': + case 'UserComment': case 'Artist': case 'Copyright': case 'RelatedSoundFile': @@ -1682,7 +1682,6 @@ class FormatMetadata extends ContextSource { protected function getExtendedMetadataFromHook( File $file, array $extendedMetadata, &$maxCacheTime ) { - Hooks::run( 'GetExtendedMetadata', [ &$extendedMetadata, $file, @@ -1806,7 +1805,6 @@ class FormatMetadata extends ContextSource { $field['value'] = $this->resolveMultivalueValue( $field['value'] ); } } - } /**