diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-03-21 13:37:55 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-03-21 13:37:55 +0100 |
commit | 9980645ab8bf061decc36837ceea1dc5ead9f824 (patch) | |
tree | 86d2e19826bf3ab86a14a077914080d73c22e1cd /mod | |
parent | ead45292e134fa03726912905ca1ca58ccb12fec (diff) | |
download | volse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.tar.gz volse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.tar.bz2 volse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.zip |
fix acl for if we have an cid in /network and make $bang better visible
Diffstat (limited to 'mod')
-rw-r--r-- | mod/network.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/network.php b/mod/network.php index 7f8d39044..a145aca36 100644 --- a/mod/network.php +++ b/mod/network.php @@ -116,8 +116,21 @@ function network_content(&$a, $update = 0, $load = false) { if(x($_GET,'search') || x($_GET,'file')) $nouveau = true; - if($cid) - $def_acl = array('allow_cid' => '<' . intval($cid) . '>'); + if($cid) { + $r = q("SELECT abook_xchan FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1", + intval($cid), + intval(local_channel()) + ); + if(! $r) { + if($update) { + killme(); + } + notice( t('No such channel') . EOL ); + goaway($a->get_baseurl(true) . '/network'); + // NOTREACHED + } + $def_acl = array('allow_cid' => '<' . $r[0]['abook_xchan'] . '>'); + } if(! $update) { $tabs = network_tabs(); |