diff options
author | plegall <plg@piwigo.org> | 2015-01-12 08:39:43 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-01-12 08:39:43 +0000 |
commit | 48354d14aa740a2b8a51b66dc254670fd5e51554 (patch) | |
tree | 568ccf4bbb6832e3a3aa4edc8778bcca817c0fdb | |
parent | a9c7ac432cae4758ef9a5d48cc8984b7502c454b (diff) |
merge r30887 from trunk to branch 2.7
feature 2943: ability to display metadata (via plugin) even if Piwigo core
finds no EXIF. Patch by xbgmsharp (will be used by plugin videoJS).
git-svn-id: http://piwigo.org/svn/branches/2.7@30888 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/functions_metadata.inc.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php index 148f8f775..ab3d6a7f1 100644 --- a/include/functions_metadata.inc.php +++ b/include/functions_metadata.inc.php @@ -150,9 +150,16 @@ function get_exif_data($filename, $map) } // Read EXIF data - if ($exif = @read_exif_data($filename)) + if ($exif = @read_exif_data($filename) or $exif2 = trigger_change('format_exif_data', $exif=null, $filename, $map)) { - $exif = trigger_change('format_exif_data', $exif, $filename, $map); + if (!empty($exif2)) + { + $exif = $exif2; + } + else + { + $exif = trigger_change('format_exif_data', $exif, $filename, $map); + } // configured fields foreach ($map as $key => $field) |