aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_metadata.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-02-10 13:55:15 +0000
committerplegall <plg@piwigo.org>2012-02-10 13:55:15 +0000
commit59ef36277a33a3dd8e159583d30e8583a27895a0 (patch)
tree47f7e4a6bf51701eea14028c2e78588f57ffa855 /admin/include/functions_metadata.php
parent1411c5bf52b6122a2b9e01984a9e4ca97bf0fba9 (diff)
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
Diffstat (limited to 'admin/include/functions_metadata.php')
-rw-r--r--admin/include/functions_metadata.php1
1 files changed, 1 insertions, 0 deletions
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(