Merge pull request #9086 from annando/insert-replace

Replace "insert" with "replace"
This commit is contained in:
Hypolite Petovan 2020-08-28 09:56:39 -04:00 committed by GitHub
commit d1bbe1dcbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -1421,7 +1421,7 @@ class Database
if (is_bool($old_fields)) {
if ($do_insert) {
$values = array_merge($condition, $fields);
return $this->insert($table, $values, $do_insert);
return $this->replace($table, $values);
}
$old_fields = [];
}

View file

@ -349,7 +349,7 @@ class APContact
if (!DBA::exists('inbox-status', ['url' => $url])) {
$fields = array_merge($fields, ['url' => $url, 'created' => $now]);
DBA::insert('inbox-status', $fields);
DBA::replace('inbox-status', $fields);
} else {
DBA::update('inbox-status', $fields, ['url' => $url]);
}

View file

@ -148,7 +148,7 @@ class DeliveryData
$fields['uri-id'] = $uri_id;
return DBA::insert('post-delivery-data', $fields);
return DBA::replace('post-delivery-data', $fields);
}
/**