From c618bfc607498998916f01fd9c6985c2ecd47356 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 24 Feb 2018 19:42:39 +0100 Subject: mark connections where we do not have post_comments permissions with an no entry sign. --- Zotlabs/Module/Connections.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Connections.php') diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index 255731c9c..55e716ace 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -245,6 +245,11 @@ class Connections extends \Zotlabs\Web\Controller { ((intval($rr['abook_blocked'])) ? t('Blocked') : ''), ((intval($rr['abook_not_here'])) ? t('Not connected at this location') : '') ); + + $oneway = false; + if(! intval(get_abconfig(local_channel(),$rr['xchan_hash'],'their_perms','post_comments'))) { + $oneway = true; + } foreach($status as $str) { if(!$str) @@ -283,7 +288,8 @@ class Connections extends \Zotlabs\Web\Controller { 'ignore_hover' => t('Ignore connection'), 'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false), 'recent_label' => t('Recent activity'), - 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']) + 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']), + 'oneway' => $oneway ); } } -- cgit v1.2.3