diff options
author | plegall <plg@piwigo.org> | 2010-05-04 23:45:20 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-05-04 23:45:20 +0000 |
commit | addb6b5ddc363c52524e2bc37f41e89995c45cfb (patch) | |
tree | 43f1a59da7bbadc89b467c346b778dad41ce1fb6 | |
parent | a00a2039985094552e5e1ee9462624a6c792cce1 (diff) |
feature 620: ability to synchronize metadata from high definition photo, if no
metadata available in "web sized" photo. This commit is a report of r4683 from
update_metadata function in admin/include/functions_metadata.php in the
duplicated code get_element_metadata of admin/site_reader_local.php. See
feature 620 for details about code duplication.
git-svn-id: http://piwigo.org/svn/trunk@6076 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/site_reader_local.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/admin/site_reader_local.php b/admin/site_reader_local.php index b5e21cd0e..3a4001d1f 100644 --- a/admin/site_reader_local.php +++ b/admin/site_reader_local.php @@ -205,12 +205,22 @@ function get_element_metadata($file, $has_high = false) if ($conf['use_exif']) { - $data = array_merge($data, get_sync_exif_data($file) ); + $exif = get_sync_exif_data($file); + if (count($exif) == 0 and isset($data['high_filesize'])) + { + $exif = get_sync_exif_data($high_file); + } + $data = array_merge($data, $exif); } if ($conf['use_iptc']) { - $data = array_merge($data, get_sync_iptc_data($file) ); + $iptc = get_sync_iptc_data($file); + if (count($iptc) == 0 and isset($data['high_filesize'])) + { + $iptc = get_sync_iptc_data($high_file); + } + $data = array_merge($data, $iptc); } return $data; |