mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-11-08 01:42:29 +01:00
bug 339 fixed: crash on metadata synchronization when duplicate keywords.
improvement: tools/metadata.php is nearer of what metadata synchronization uses (concerning keywords) git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1222 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
1 parent
81abfe32ec
commit
599665c2cf
2 files changed
+44
-7
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user