Merge branch 'issue-4816' of github.com:annando/friendica into issue-4816

This commit is contained in:
Michael 2018-04-11 19:21:23 +00:00
commit 88eaef6704
2 changed files with 12 additions and 1 deletions

View file

@ -1418,7 +1418,13 @@ class PortableContact
dba::delete('gserver-tag', ['gserver-id' => $gserver['id']]);
if ($data->scope == 'tags') {
// Avoid duplicates
$tags = [];
foreach ($data->tags as $tag) {
$tags[$tag] = $tag;
}
foreach ($tags as $tag) {
dba::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag]);
}
}