X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGContact.php;h=c413bef4fa9ebde5d1a5cf95aab08c663a6f1dd2;hb=6129eb1623f28e1afc585d2756f6ff4f5315e754;hp=8f16c07fc1906576a5935e8d4a14a299e2772f8b;hpb=2c00e3ad363c09fc40e6bebacdad4c027f002460;p=friendica.git diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 8f16c07fc1..c413bef4fa 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -239,10 +239,8 @@ class GContact if ($alternate && ($gcontact['network'] == NETWORK_OSTATUS)) { // Delete the old entry - if it exists - $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile))); - if (DBM::is_result($r)) { - q("DELETE FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile))); - q("DELETE FROM `glink` WHERE `gcid` = %d", intval($r[0]["id"])); + if (dba::exists('gcontact', ['nurl' => normalise_link($orig_profile)])) { + dba::delete('gcontact', ['nurl' => normalise_link($orig_profile)]); } } }