From 44ee4a54b49cf7c6f4cbb2bc760b09be86cb8cfb Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 27 Aug 2020 21:35:08 +0000 Subject: [PATCH] Replace "insert" with "replace" --- src/Database/Database.php | 2 +- src/Model/APContact.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index 787ae54c7..80fd02dc0 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -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 = []; } diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 9fc72ac5a..634ce441a 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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]); }