X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FContact.php;h=becc80c0c3c6e09e557e77778aaf37cc59882b80;hb=c141a3eb7951a7b171e700ebfdaba83a154f6f40;hp=9ae27994c7e33e3f19b899f411a3b11ff831e368;hpb=737b04d7e2cb2452f9ac25071d2cf67544e01476;p=friendica.git diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 9ae27994c7..becc80c0c3 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1142,7 +1142,7 @@ class Contact // Fetch contact data from the contact table for the given user $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending` + `keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`,`baseurl` FROM `contact` WHERE `addr` = '%s' AND `uid` = %d AND NOT `deleted`", DBA::escape($addr), intval($uid) @@ -1150,7 +1150,7 @@ class Contact // Fetch the data from the contact table with "uid=0" (which is filled automatically) if (!DBA::isResult($r)) { $r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending` + `keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`, `baseurl` FROM `contact` WHERE `addr` = '%s' AND `uid` = 0 AND NOT `deleted`", DBA::escape($addr) ); @@ -1159,7 +1159,7 @@ class Contact // Fetch the data from the gcontact table if (!DBA::isResult($r)) { $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`, - `keywords`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending` + `keywords`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending`, `server_url` AS `baseurl` FROM `gcontact` WHERE `addr` = '%s'", DBA::escape($addr) ); @@ -1235,7 +1235,7 @@ class Contact } if (($contact['network'] == Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) { - $poke_link = DI::baseUrl() . '/poke/?c=' . $contact['id']; + $poke_link = 'contact/' . $contact['id'] . '/poke'; } $contact_url = DI::baseUrl() . '/contact/' . $contact['id']; @@ -2057,6 +2057,7 @@ class Contact Worker::add(PRIORITY_HIGH, 'MergeContact', $first, $duplicate['id'], $uid); } + DBA::close($duplicates); Logger::info('Duplicates handled', ['uid' => $uid, 'nurl' => $nurl]); return true; } @@ -2732,6 +2733,7 @@ class Contact ); } } + DBA::close($contacts); } /**