aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_metadata.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-10-19 21:56:53 +0000
committerplegall <plg@piwigo.org>2005-10-19 21:56:53 +0000
commit233bd56dd8e7b512c50e1f98314fcca07624d3aa (patch)
treefe908c2718741b7e5f421ae76f42e95d3a134f3f /admin/include/functions_metadata.php
parent4b4e8a4663301b404ca6bb8f92ec1cfbeb7507a9 (diff)
- bug 174 fixed: use_exif_mapping configuration parameter was not used to
list database fields to update from EXIF values. git-svn-id: http://piwigo.org/svn/trunk@903 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_metadata.php')
-rw-r--r--admin/include/functions_metadata.php30
1 files changed, 24 insertions, 6 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 79e38a829..3979e0e40 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -135,19 +135,37 @@ function update_metadata($files)
if (count($datas) > 0)
{
- $update_fields = array('filesize','width','height','date_metadata_update');
+ $update_fields =
+ array(
+ 'filesize',
+ 'width',
+ 'height',
+ 'date_metadata_update'
+ );
+
if ($conf['use_exif'])
{
- array_push($update_fields, 'date_creation');
+ $update_fields =
+ array_merge(
+ $update_fields,
+ array_keys($conf['use_exif_mapping'])
+ );
}
+
if ($conf['use_iptc'])
{
- $update_fields = array_merge($update_fields,
- array_keys($conf['use_iptc_mapping']));
+ $update_fields =
+ array_merge(
+ $update_fields,
+ array_keys($conf['use_iptc_mapping'])
+ );
}
- $fields = array('primary' => array('id'),
- 'update' => array_unique($update_fields));
+ $fields =
+ array(
+ 'primary' => array('id'),
+ 'update' => array_unique($update_fields)
+ );
mass_updates(IMAGES_TABLE, $fields, $datas);
}
}