aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_metadata.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 1df03ba43..f468ab7e3 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -53,6 +53,16 @@ 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'] = implode(
+ ',',
+ array_unique(
+ explode(
+ ',',
+ $iptc['keywords']
+ )
+ )
+ );
}
return $iptc;