]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
OpenId possibly fixed:
[friendica.git] / src / Model / GContact.php
index 8f16c07fc1906576a5935e8d4a14a299e2772f8b..c413bef4fa9ebde5d1a5cf95aab08c663a6f1dd2 100644 (file)
@@ -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)]);
                                }
                        }
                }