aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_metadata.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-06-06 10:13:42 +0000
committerrvelices <rv-github@modusoptimus.com>2010-06-06 10:13:42 +0000
commitfbf4326d5ad86b485b02a2eaef147c5edf989ad8 (patch)
tree645645311a12de0d05cc11aedcb2b65a996b2023 /include/functions_metadata.inc.php
parentfd0f465c59415c73bf6cf926a73804b32807c969 (diff)
- quick fix (maybe not the cleanest) of regression 2.0 -> 2.1 when displaying metadata on picture page (event called with different input)
git-svn-id: http://piwigo.org/svn/trunk@6473 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_metadata.inc.php')
-rw-r--r--include/functions_metadata.inc.php43
1 files changed, 25 insertions, 18 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;