mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:04:24 +02:00
Issue 9968: Avoid blocking update calls
This commit is contained in:
parent
aa6472061b
commit
d78345e694
3 changed files with 7 additions and 3 deletions
|
@ -855,7 +855,9 @@ class Contact
|
|||
if (!empty($contact['batch']) && !empty($contact['term-date']) && ($contact['term-date'] > DBA::NULL_DATETIME)) {
|
||||
$fields = ['failed' => false, 'term-date' => DBA::NULL_DATETIME, 'archive' => false];
|
||||
$condition = ['uid' => 0, 'network' => Protocol::FEDERATED, 'batch' => $contact['batch'], 'contact-type' => self::TYPE_RELAY];
|
||||
DBA::update('contact', $fields, $condition);
|
||||
if (!DBA::exists('contact', array_merge($condition, $fields))) {
|
||||
DBA::update('contact', $fields, $condition);
|
||||
}
|
||||
}
|
||||
|
||||
$condition = ['`id` = ? AND (`term-date` > ? OR `archive`)', $contact['id'], DBA::NULL_DATETIME];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue