From cf5f9f4eb6ff84813db69bcd5aede7bd690f3ca7 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 5 Apr 2006 18:02:10 +0000 Subject: typo fixed: forgotten a "$" on $tags_of array when calling set_tags_of. modification: "." and ";" are also supported as IPTC keywords separator. git-svn-id: http://piwigo.org/svn/trunk@1127 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions_metadata.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'admin/include/functions_metadata.php') diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index d4324a763..1df03ba43 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -50,7 +50,8 @@ function get_sync_iptc_data($file) if (isset($iptc['keywords'])) { - // keywords separator is the comma + // official keywords separator is the comma + $iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']); $iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']); } @@ -180,16 +181,17 @@ function update_metadata($files) ); } - $fields = + mass_updates( + IMAGES_TABLE, array( 'primary' => array('id'), 'update' => array_unique($update_fields) - ); - echo '
'; print_r($datas); echo '
'; - mass_updates(IMAGES_TABLE, $fields, $datas); + ), + $datas + ); } - set_tags_of(tags_of); + set_tags_of($tags_of); } /** -- cgit v1.2.3