X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fremove_contact.php;h=92f712255771bb05537801b2451b3533448ca89b;hb=71a5de40f105234aa8082844d7839c3e0e49e905;hp=bb110a284b9283123ec0c2f78c090aff87d8a673;hpb=e6cbe3be11ea348ef041258473c101523a004d94;p=friendica.git diff --git a/include/remove_contact.php b/include/remove_contact.php index bb110a284b..92f7122557 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,7 +14,7 @@ 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)); + $r = dba::select('contact', array('id'), array('id' => $id), array('limit' => 1)); if (dbm::is_result($r)) { return; } @@ -22,4 +22,3 @@ function remove_contact_run($argv, $argc) { // Now we delete all the depending table entries dba::delete('contact', array('id' => $id)); } -?>