From 249094fee910432ec41a6573638282cf167a2c85 Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 7 Jun 2010 19:05:04 +0000 Subject: - revert r6473 and r6475 - moved call to event format_exif_data earlier git-svn-id: http://piwigo.org/svn/trunk@6484 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_metadata.inc.php | 44 ++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'include/functions_metadata.inc.php') diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php index 2b298606f..95ed2befc 100644 --- a/include/functions_metadata.inc.php +++ b/include/functions_metadata.inc.php @@ -117,31 +117,25 @@ function get_exif_data($filename, $map) // Read EXIF data if ($exif = @read_exif_data($filename)) { - if ($map != null) - { - foreach ($map as $key => $field) - { - if (strpos($field, ';') === false) - { - if (isset($exif[$field])) - { - $result[$key] = $exif[$field]; - } - } - else - { - $tokens = explode(';', $field); - if (isset($exif[$tokens[0]][$tokens[1]])) - { - $result[$key] = $exif[$tokens[0]][$tokens[1]]; - } - } - } - } - else - { - $result = $exif; - } + $exif = trigger_event('format_exif_data', $exif, $filename ); + foreach ($map as $key => $field) + { + if (strpos($field, ';') === false) + { + if (isset($exif[$field])) + { + $result[$key] = $exif[$field]; + } + } + else + { + $tokens = explode(';', $field); + if (isset($exif[$tokens[0]][$tokens[1]])) + { + $result[$key] = $exif[$tokens[0]][$tokens[1]]; + } + } + } } return $result; -- cgit v1.2.3