Replace "insert" with "replace"
This commit is contained in:
parent
e4207408ee
commit
44ee4a54b4
2 changed files with 2 additions and 2 deletions
|
@ -1421,7 +1421,7 @@ class Database
|
||||||
if (is_bool($old_fields)) {
|
if (is_bool($old_fields)) {
|
||||||
if ($do_insert) {
|
if ($do_insert) {
|
||||||
$values = array_merge($condition, $fields);
|
$values = array_merge($condition, $fields);
|
||||||
return $this->insert($table, $values, $do_insert);
|
return $this->replace($table, $values);
|
||||||
}
|
}
|
||||||
$old_fields = [];
|
$old_fields = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,7 +349,7 @@ class APContact
|
||||||
|
|
||||||
if (!DBA::exists('inbox-status', ['url' => $url])) {
|
if (!DBA::exists('inbox-status', ['url' => $url])) {
|
||||||
$fields = array_merge($fields, ['url' => $url, 'created' => $now]);
|
$fields = array_merge($fields, ['url' => $url, 'created' => $now]);
|
||||||
DBA::insert('inbox-status', $fields);
|
DBA::replace('inbox-status', $fields);
|
||||||
} else {
|
} else {
|
||||||
DBA::update('inbox-status', $fields, ['url' => $url]);
|
DBA::update('inbox-status', $fields, ['url' => $url]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue