aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-17 19:10:55 +0000
committerplegall <plg@piwigo.org>2005-01-17 19:10:55 +0000
commit30002c53eabebc842bdf7d63469737bfbf0ecbb5 (patch)
treec27d2c439ea214625246be02965e85520af58980 /admin
parent4d093b96c47ee5da2ee048e53abc7810f0530445 (diff)
- bug fixed : only fields corresponding to the metadata synchronization are
updated (ie : no update of keywords if use_iptc is off) git-svn-id: http://piwigo.org/svn/trunk@702 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_metadata.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 238c471de..6173e2179 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -113,10 +113,19 @@ function update_metadata($files)
if (count($datas) > 0)
{
+ $update_fields = array('filesize','width','height','date_metadata_update');
+ if ($conf['use_exif'])
+ {
+ array_push($update_fields, 'date_creation');
+ }
+ if ($conf['use_iptc'])
+ {
+ $update_fields = array_merge($update_fields,
+ array_keys($conf['use_iptc_mapping']));
+ }
+
$fields = array('primary' => array('id'),
- 'update' => array('filesize','width','height','name',
- 'author','comment','date_creation',
- 'keywords','date_metadata_update'));
+ 'update' => array_unique($update_fields));
mass_updates(IMAGES_TABLE, $fields, $datas);
}
}