Merge branch 'issue-4816' of github.com:annando/friendica into issue-4816
This commit is contained in:
commit
88eaef6704
|
@ -345,9 +345,14 @@ class Contact extends BaseObject
|
|||
$fields = ['term-date' => NULL_DATE, 'archive' => false];
|
||||
dba::update('contact', $fields, ['id' => $contact['id']]);
|
||||
|
||||
if ($contact['url'] != '') {
|
||||
if (!empty($contact['url'])) {
|
||||
dba::update('contact', $fields, ['nurl' => normalise_link($contact['url'])]);
|
||||
}
|
||||
|
||||
if (!empty($contact['batch'])) {
|
||||
$condition = ['batch' => $contact['batch'], 'contact-type' => ACCOUNT_TYPE_RELAY];
|
||||
dba::update('contact', $fields, $condition);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue