From 98b0f97639e45ec099bcceb7db1880966163732c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Aug 2019 21:24:33 -0400 Subject: [PATCH] Suppress relationship string in template vars for public contact --- src/Module/Contact.php | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 6eb46d9d5..4a127eee4 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -984,24 +984,26 @@ class Contact extends BaseModule $dir_icon = ''; $alt_text = ''; - switch ($rr['rel']) { - case Model\Contact::FRIEND: - $dir_icon = 'images/lrarrow.gif'; - $alt_text = L10n::t('Mutual Friendship'); - break; + if ($rr['uid']) { + switch ($rr['rel']) { + case Model\Contact::FRIEND: + $dir_icon = 'images/lrarrow.gif'; + $alt_text = L10n::t('Mutual Friendship'); + break; - case Model\Contact::FOLLOWER; - $dir_icon = 'images/larrow.gif'; - $alt_text = L10n::t('is a fan of yours'); - break; + case Model\Contact::FOLLOWER; + $dir_icon = 'images/larrow.gif'; + $alt_text = L10n::t('is a fan of yours'); + break; - case Model\Contact::SHARING; - $dir_icon = 'images/rarrow.gif'; - $alt_text = L10n::t('you are a fan of'); - break; + case Model\Contact::SHARING; + $dir_icon = 'images/rarrow.gif'; + $alt_text = L10n::t('you are a fan of'); + break; - default: - break; + default: + break; + } } $url = Model\Contact::magicLink($rr['url']);