aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2014-11-13 13:06:31 -0800
committerHabeas Codice <habeascodice@federated.social>2014-11-13 13:06:31 -0800
commitac27db22c18ee7a82a52cbadb3efe2760b910499 (patch)
treeaa7002d73dbcd4136033589f1cb135184f4126c1 /mod/zfinger.php
parent1a5a5c7edb8697c93f8bababbafa80245378dd7e (diff)
parent109cb936632c693d3f24afb9e2ce533797ad1a7f (diff)
downloadvolse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.tar.gz
volse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.tar.bz2
volse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: boot.php include/dba/dba_driver.php include/diaspora.php include/follow.php include/session.php include/zot.php mod/photos.php mod/ping.php
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 7966caea8..a1a62dd3f 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -108,6 +108,21 @@ function zfinger_init(&$a) {
if($deleted || $censored)
$searchable = false;
+ $public_forum = false;
+
+ $role = get_pconfig($e['channel_id'],'system','permissions_role');
+ if($role === 'forum') {
+ $public_forum = true;
+ }
+ else {
+ // check if it has characteristics of a public forum based on custom permissions.
+ $t = q("select abook_my_perms from abook where abook_channel = %d and (abook_flags & %d) limit 1",
+ intval($e['channel_id']),
+ intval(ABOOK_FLAG_SELF)
+ );
+ if($t && ($t[0]['abook_my_perms'] & PERMS_W_TAGWALL))
+ $public_forum = true;
+ }
// This is for birthdays and keywords, but must check access permissions
@@ -174,6 +189,7 @@ function zfinger_init(&$a) {
$ret['target_sig'] = $zsig;
$ret['searchable'] = $searchable;
$ret['adult_content'] = $adult_channel;
+ $ret['public_forum'] = $public_forum;
if($deleted)
$ret['deleted'] = $deleted;