aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-02-10 13:57:11 +0000
committerplegall <plg@piwigo.org>2012-02-10 13:57:11 +0000
commit1a56352d0854adc604c4efd640297276e5ce37ce (patch)
tree27dbed7d665fb725a00f2f61a75f32dd778af873 /admin/include
parent9edfe9bbb9203403d1482fc3f18eea664e20dcb3 (diff)
merge r13080 from branch 2.3 to trunk
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/trunk@13081 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-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 45680e8e0..d231722ad 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(