X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact.php;h=0b27f0e4a37d1a20a3d222174778743fbd5f3897;hb=cdefa7f32a224501a14bcacbe0f0a3792631df93;hp=7f31527a2b30efff4766d6b41b02983cd3cab6eb;hpb=591ba9c68e82491468f7e97c966b2e5e3c0eefd6;p=friendica.git diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 7f31527a2b..0b27f0e4a3 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -642,7 +642,8 @@ class Contact extends BaseModule $sql_extra = " AND `archive` AND NOT `blocked`"; break; case 'pending': - $sql_extra = " AND `pending` AND NOT `archive`"; + $sql_extra = sprintf(" AND `pending` AND NOT `archive` AND ((`rel` = %d) + OR EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id` AND NOT `ignore`))", Model\Contact::SHARING); break; default: $sql_extra = " AND NOT `archive` AND NOT `blocked` AND NOT `pending`"; @@ -993,14 +994,6 @@ class Contact extends BaseModule $alt_text = L10n::t('Pending outgoing contact request'); } else { $alt_text = L10n::t('Pending incoming contact request'); - $intro = DBA::selectFirst('intro', ['blocked', 'ignore'], ['contact-id' => $rr['id']]); - if (DBA::isResult($intro)) { - if ($intro['blocked']) { - $alt_text = L10n::t('Blocked incoming contact request'); - } elseif ($intro['ignore']) { - $alt_text = L10n::t('Ignored incoming contact request'); - } - } } }