X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fremove_contact.php;h=9d4b1e4c3709214f56bf74d77c85c35aeaa9a8dc;hb=cdc41d6018e8e564b545e3c2eb6c77602c5ff2b4;hp=bb110a284b9283123ec0c2f78c090aff87d8a673;hpb=5ef44ad71b6becd32ad501f31a8811ad451e09d1;p=friendica.git diff --git a/include/remove_contact.php b/include/remove_contact.php index bb110a284b..9d4b1e4c37 100644 --- a/include/remove_contact.php +++ b/include/remove_contact.php @@ -4,7 +4,7 @@ * @brief Removes orphaned data from deleted contacts */ -use \Friendica\Core\Config; +use Friendica\Core\Config; function remove_contact_run($argv, $argc) { if ($argc != 2) { @@ -14,12 +14,11 @@ function remove_contact_run($argv, $argc) { $id = intval($argv[1]); // Only delete if the contact doesn't exist (anymore) - $r = q("SELECT `id` FROM `contact` WHERE `id` = %d", intval($id)); - if (dbm::is_result($r)) { + $r = dba::exists('contact', array('id' => $id)); + if ($r) { return; } // Now we delete all the depending table entries dba::delete('contact', array('id' => $id)); } -?>