mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:10:11 +00:00
Remove "fcontact" from suggestions
This commit is contained in:
parent
b0bb95bb0d
commit
f1d3f60499
8 changed files with 96 additions and 87 deletions
|
@ -98,14 +98,13 @@ class Introduction extends BaseFactory
|
|||
$formattedIntroductions = [];
|
||||
|
||||
try {
|
||||
/// @todo Fetch contact details by "Contact::getByUrl" instead of queries to contact and fcontact
|
||||
$stmtNotifications = $this->dba->p(
|
||||
"SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*,
|
||||
`fcontact`.`name` AS `fname`, `fcontact`.`url` AS `furl`, `fcontact`.`addr` AS `faddr`,
|
||||
`fcontact`.`photo` AS `fphoto`, `fcontact`.`request` AS `frequest`
|
||||
`sugggest-contact`.`name` AS `fname`, `sugggest-contact`.`url` AS `furl`, `sugggest-contact`.`addr` AS `faddr`,
|
||||
`sugggest-contact`.`photo` AS `fphoto`, `sugggest-contact`.`request` AS `frequest`
|
||||
FROM `intro`
|
||||
LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
|
||||
LEFT JOIN `fcontact` ON `intro`.`fid` = `fcontact`.`id`
|
||||
LEFT JOIN `contact` AS `sugggest-contact` ON `intro`.`suggest-cid` = `sugggest-contact`.`id`
|
||||
WHERE `intro`.`uid` = ? $sql_extra
|
||||
LIMIT ?, ?",
|
||||
$_SESSION['uid'],
|
||||
|
@ -121,7 +120,7 @@ class Introduction extends BaseFactory
|
|||
// There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
|
||||
// We have to distinguish between these two because they use different data.
|
||||
// Contact suggestions
|
||||
if ($intro['fid'] ?? '') {
|
||||
if ($intro['suggest-cid'] ?? '') {
|
||||
if (empty($intro['furl'])) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue