aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-22 14:59:46 +0100
committerMario <mario@mariovavti.com>2019-11-22 14:59:46 +0100
commit530d816df6d4d0ede07fb56543519439dfa50bbc (patch)
treeb5202776942979f9b56a9be0e84b13cfcf65a0c6 /include
parent4a4c43bb2c336622181ccdd006642efc7b9f1ee5 (diff)
parent23c47f78eada85c1f897bbf348a4f802db9ef2f9 (diff)
downloadvolse-hubzilla-530d816df6d4d0ede07fb56543519439dfa50bbc.tar.gz
volse-hubzilla-530d816df6d4d0ede07fb56543519439dfa50bbc.tar.bz2
volse-hubzilla-530d816df6d4d0ede07fb56543519439dfa50bbc.zip
Merge branch 'better-conn-status' into 'dev'
More descriptive connection status icons See merge request hubzilla/core!1789
Diffstat (limited to 'include')
-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'],