aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-22 17:04:13 -0700
committerredmatrix <git@macgirvin.com>2016-08-22 17:04:13 -0700
commite967bc9c455c27f08a2add12d566e81036819e4e (patch)
tree962e3e0e5050a936e6ba5163aac9763d5636426e /include/zot.php
parentd6d21cb5f65484a9d4884e0b223c0e881ecb4b17 (diff)
downloadvolse-hubzilla-e967bc9c455c27f08a2add12d566e81036819e4e.tar.gz
volse-hubzilla-e967bc9c455c27f08a2add12d566e81036819e4e.tar.bz2
volse-hubzilla-e967bc9c455c27f08a2add12d566e81036819e4e.zip
public forum fallback checking (when custom/expert permissions are applied) was looking at owner rather than observer perms
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 01b29f74b..c3c924113 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3708,6 +3708,8 @@ function zotinfo($arr) {
}
}
+ $ztarget_hash = (($ztarget && $zsig) ? make_xchan_hash($ztarget,$zsig) : '' );
+
$r = null;
if(strlen($zhash)) {
@@ -3783,11 +3785,11 @@ function zotinfo($arr) {
if($role === 'forum' || $role === 'repository') {
$public_forum = true;
}
- else {
+ elseif($ztarget_hash) {
// check if it has characteristics of a public forum based on custom permissions.
$t = q("select * from abconfig where abconfig.cat = 'my_perms' and abconfig.chan = %d and abconfig.xchan = '%s' and abconfig.k in ('tag_deliver', 'send_stream') ",
intval($e['channel_id']),
- dbesc($e['channel_hash'])
+ dbesc($ztarget_hash)
);
$ch = 0;
@@ -3889,9 +3891,6 @@ function zotinfo($arr) {
$ret['follow_url'] = z_root() . '/follow?f=&url=%s';
- $ztarget_hash = (($ztarget && $zsig)
- ? make_xchan_hash($ztarget,$zsig)
- : '' );
$permissions = get_all_perms($e['channel_id'],$ztarget_hash,false);