aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Viewconnections.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Viewconnections.php')
-rw-r--r--Zotlabs/Module/Viewconnections.php28
1 files changed, 25 insertions, 3 deletions
diff --git a/Zotlabs/Module/Viewconnections.php b/Zotlabs/Module/Viewconnections.php
index 30df0b9e4..a0c293ddf 100644
--- a/Zotlabs/Module/Viewconnections.php
+++ b/Zotlabs/Module/Viewconnections.php
@@ -74,7 +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) {
$contacts[] = array(
@@ -88,12 +110,12 @@ class Viewconnections extends \Zotlabs\Web\Controller {
'sparkle' => '',
'itemurl' => $rr['url'],
'network' => '',
+ 'perminfo' => (($is_owner) ? $perminfo : (($perminfo['connpermcount'] === 0) ? $perminfo : [])),
'oneway' => $oneway
);
}
}
-
-
+
if($_REQUEST['aj']) {
if($contacts) {
$o = replace_macros(get_markup_template('viewcontactsajax.tpl'),array(