aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_metadata.inc.php43
-rw-r--r--include/picture_metadata.inc.php11
2 files changed, 27 insertions, 27 deletions
diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php
index 5f2041291..2b298606f 100644
--- a/include/functions_metadata.inc.php
+++ b/include/functions_metadata.inc.php
@@ -117,24 +117,31 @@ function get_exif_data($filename, $map)
// Read EXIF data
if ($exif = @read_exif_data($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]];
- }
- }
- }
+ 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;
+ }
}
return $result;
diff --git a/include/picture_metadata.inc.php b/include/picture_metadata.inc.php
index df37b4212..7b4ce9dc1 100644
--- a/include/picture_metadata.inc.php
+++ b/include/picture_metadata.inc.php
@@ -29,18 +29,11 @@
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
if (($conf['show_exif']) and (function_exists('read_exif_data')))
{
- $exif_mapping = array();
- foreach ($conf['show_exif_fields'] as $field)
- {
- $exif_mapping[$field] = $field;
- }
-
- $exif = get_exif_data($picture['current']['image_path'], $exif_mapping);
+ $exif = get_exif_data($picture['current']['image_path'], null);
if (count($exif) == 0 and $picture['current']['has_high'])
{
- $exif = get_exif_data($picture['current']['high_url'], $exif_mapping);
+ $exif = get_exif_data($picture['current']['high_url'], null);
}
-
if (count($exif) > 0)
{
$exif = trigger_event('format_exif_data', $exif, $picture['current'] );