aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Viewconnections.php
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2019-11-22 14:59:45 +0100
committerMario <mario@mariovavti.com>2019-11-22 14:59:45 +0100
commit23c47f78eada85c1f897bbf348a4f802db9ef2f9 (patch)
treeb5202776942979f9b56a9be0e84b13cfcf65a0c6 /Zotlabs/Module/Viewconnections.php
parent4a4c43bb2c336622181ccdd006642efc7b9f1ee5 (diff)
downloadvolse-hubzilla-23c47f78eada85c1f897bbf348a4f802db9ef2f9.tar.gz
volse-hubzilla-23c47f78eada85c1f897bbf348a4f802db9ef2f9.tar.bz2
volse-hubzilla-23c47f78eada85c1f897bbf348a4f802db9ef2f9.zip
More descriptive connection status icons
Diffstat (limited to 'Zotlabs/Module/Viewconnections.php')
-rw-r--r--Zotlabs/Module/Viewconnections.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/Zotlabs/Module/Viewconnections.php b/Zotlabs/Module/Viewconnections.php
index 30df0b9e4..18a52c247 100644
--- a/Zotlabs/Module/Viewconnections.php
+++ b/Zotlabs/Module/Viewconnections.php
@@ -74,6 +74,29 @@ class Viewconnections extends \Zotlabs\Web\Controller {
if(! intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
$oneway = true;
}
+
+ $perminfo=[];
+ $perminfo['connpermcount']=0;
+ $perminfo['connperms']=t('Accepts').': ';
+ if(intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
+ $perminfo['connpermcount']++;
+ $perminfo['connperms'] .= t('Comments');
+ }
+ if(intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','send_stream'))) {
+ $perminfo['connpermcount']++;
+ $perminfo['connperms'] = ($perminfo['connperms']) ? $perminfo['connperms'] . ',' : $perminfo['connperms'] ;
+ $perminfo['connperms'] .= t('Stream items');
+ }
+ if(intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_wall'))) {
+ $perminfo['connpermcount']++;
+ $perminfo['connperms'] = ($perminfo['connperms']) ? $perminfo['connperms'] . ',' : $perminfo['connperms'] ;
+ $perminfo['connperms'] .= t('Wall posts');
+ }
+
+ if ($perminfo['connpermcount'] == 0) {
+ $perminfo['connperms'] .= t('Nothing');
+ }
+
$url = chanlink_hash($rr['xchan_hash']);
if($url) {
@@ -88,6 +111,7 @@ class Viewconnections extends \Zotlabs\Web\Controller {
'sparkle' => '',
'itemurl' => $rr['url'],
'network' => '',
+ 'perminfo' => $perminfo,
'oneway' => $oneway
);
}