Ignore EXIF data in FormatMetadata::fetchExtendedMetadata()
authorGergő Tisza <tgr.huwiki@gmail.com>
Wed, 14 Jan 2015 03:04:02 +0000 (03:04 +0000)
committerGergő Tisza <tgr.huwiki@gmail.com>
Wed, 14 Jan 2015 03:04:02 +0000 (03:04 +0000)
fetchExtendedMetadata() gets extra data such as file templates
via the GetExtendedMetadata hook; keys which are absent in the
extended data default to their EXIF value.

This turned out to be a bad idea as EXIF data is too messy in
practice with various devices putting e.g. manufacturer name for
author name; completely ignoring EXIF data in the extmetadata API
is still the better option.

Bug: T73719
Change-Id: I77b1df67d08097504b3b1026c584063488e03b6e

includes/media/FormatMetadata.php

index e8e73af..7246072 100644 (file)
@@ -1679,17 +1679,6 @@ class FormatMetadata extends ContextSource {
                        );
                }
 
-               $common = $file->getCommonMetaArray();
-
-               if ( $common !== false ) {
-                       foreach ( $common as $key => $value ) {
-                               $fileMetadata[$key] = array(
-                                       'value' => $value,
-                                       'source' => 'file-metadata',
-                               );
-                       }
-               }
-
                return $fileMetadata;
        }