From: Michael Date: Mon, 11 Mar 2019 20:42:32 +0000 (+0000) Subject: The contact menu now displays the contact and posts link as well X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f0c662854641284bfcd3dc0796bbb7d10e69494;p=friendica.git The contact menu now displays the contact and posts link as well --- diff --git a/include/conversation.php b/include/conversation.php index 37752c083e..9f4313a390 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -843,6 +843,8 @@ function item_photo_menu($item) { $status_link = ''; $photos_link = ''; $posts_link = ''; + $block_link = ''; + $ignore_link = ''; if (local_user() && local_user() == $item['uid'] && $item['parent'] == $item['id'] && !$item['self']) { $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;'; @@ -854,6 +856,7 @@ function item_photo_menu($item) { $sparkle = (strpos($profile_link, 'redir/') === 0); $cid = 0; + $pcid = Contact::getIdForURL($item['author-link'], 0, true); $network = ''; $rel = 0; $condition = ['uid' => local_user(), 'nurl' => Strings::normaliseLink($item['author-link'])]; @@ -870,6 +873,13 @@ function item_photo_menu($item) { $profile_link = $profile_link . '?=profile'; } + if (!empty($pcid)) { + $contact_url = 'contact/' . $pcid; + $posts_link = 'contact/' . $pcid . '/posts'; + $block_link = 'contact/' . $pcid . '/block'; + $ignore_link = 'contact/' . $pcid . '/ignore'; + } + if ($cid && !$item['self']) { $poke_link = 'poke/?f=&c=' . $cid; $contact_url = 'contact/' . $cid; @@ -888,7 +898,9 @@ function item_photo_menu($item) { L10n::t('View Photos') => $photos_link, L10n::t('Network Posts') => $posts_link, L10n::t('View Contact') => $contact_url, - L10n::t('Send PM') => $pm_url + L10n::t('Send PM') => $pm_url, + L10n::t('Block') => $block_link, + L10n::t('Ignore') => $ignore_link ]; if ($network == Protocol::DFRN) {