From 59ef36277a33a3dd8e159583d30e8583a27895a0 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 10 Feb 2012 13:55:15 +0000 Subject: bug 559 fixed: avoid duplicate insert on tags when synchronizing metadata if the IPTC keywords contains repeated separators like "tag1,,tag2". git-svn-id: http://piwigo.org/svn/branches/2.3@13080 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions_metadata.php | 1 + 1 file changed, 1 insertion(+) (limited to 'admin') diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 7f9b516b0..2e75a0dd6 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -58,6 +58,7 @@ function get_sync_iptc_data($file) { // official keywords separator is the comma $iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']); + $iptc['keywords'] = preg_replace('/,+/', ',', $iptc['keywords']); $iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']); $iptc['keywords'] = implode( -- cgit v1.2.3