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 /include/text.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 'include/text.php')
-rw-r--r-- | include/text.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 44af40810..eba41521d 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'], |