diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-25 22:20:49 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-25 22:20:49 +0100 |
commit | 78197aa6258891a11bc9784a19b21541d94954be (patch) | |
tree | d438d0d15f23c44d213857c07521a2d9cfcc5b7a /Zotlabs/Module/Viewconnections.php | |
parent | 9e4ff8ce2584724fe5b54ed284d70d019625e7fa (diff) | |
parent | fcb065bcb2f8e61d1d9e804f8f251967732ee037 (diff) | |
download | volse-hubzilla-78197aa6258891a11bc9784a19b21541d94954be.tar.gz volse-hubzilla-78197aa6258891a11bc9784a19b21541d94954be.tar.bz2 volse-hubzilla-78197aa6258891a11bc9784a19b21541d94954be.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!6
Diffstat (limited to 'Zotlabs/Module/Viewconnections.php')
-rw-r--r-- | Zotlabs/Module/Viewconnections.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zotlabs/Module/Viewconnections.php b/Zotlabs/Module/Viewconnections.php index 30df0b9e4..320a331d1 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 ); } |