]> git.mxchange.org Git - friendica.git/blobdiff - include/remove_contact.php
The index mustn't be 192 characters long
[friendica.git] / include / remove_contact.php
index bb110a284b9283123ec0c2f78c090aff87d8a673..92f712255771bb05537801b2451b3533448ca89b 100644 (file)
@@ -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));
 }
-?>