aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.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 /include/text.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 'include/text.php')
-rw-r--r--include/text.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 44af40810..d19f4b782 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1016,10 +1016,27 @@ function contact_block() {
// There is no setting to discover if you are bi-directionally connected
// Use the ability to post comments as an indication that this relationship is more
// than wishful thinking; even though soapbox channels and feeds will disable it.
+ $rr['perminfo']['connpermcount']=0;
+ $rr['perminfo']['connperms']=t('Accepts').': ';
+ if(intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
+ $rr['perminfo']['connpermcount']++;
+ $rr['perminfo']['connperms'] .= t('Comments');
+ }
+ if(intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','send_stream'))) {
+ $rr['perminfo']['connpermcount']++;
+ $rr['perminfo']['connperms'] = ($rr['perminfo']['connperms']) ? $rr['perminfo']['connperms'] . ',' : $rr['perminfo']['connperms'] ;
+ $rr['perminfo']['connperms'] .= t('Stream items');
+ }
+ if(intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_wall'))) {
+ $rr['perminfo']['connpermcount']++;
+ $rr['perminfo']['connperms'] = ($rr['perminfo']['connperms']) ? $rr['perminfo']['connperms'] . ',' : $rr['perminfo']['connperms'] ;
+ $rr['perminfo']['connperms'] .= t('Wall posts');
+ }
- if(! intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
- $rr['oneway'] = true;
+ if ($rr['perminfo']['connpermcount'] == 0) {
+ $rr['perminfo']['connperms'] .= t('nothing');
}
+
$micropro[] = micropro($rr,true,'mpfriend');
}
}
@@ -1086,6 +1103,7 @@ function micropro($contact, $redirect = false, $class = '', $mode = false) {
'$click' => (($contact['click']) ? $contact['click'] : ''),
'$class' => $class . (($contact['archived']) ? ' archived' : ''),
'$oneway' => (($contact['oneway']) ? true : false),
+ '$perminfo' => $contact['perminfo'],
'$url' => $url,
'$photo' => $contact['xchan_photo_s'],
'$name' => $contact['xchan_name'],