1
0
Fork 0

Replace old database queries with the new ones

This commit is contained in:
Michael 2018-05-02 19:26:15 +00:00
commit 4ad655ab80
12 changed files with 42 additions and 181 deletions

View 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('item', ['nurl' => normalise_link($orig_profile)])) {
dba::delete('gcontact', ['nurl' => normalise_link($orig_profile)]);
}
}
}