diff options
author | friendica <info@friendica.com> | 2015-03-21 16:47:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-21 16:47:46 -0700 |
commit | b298bc8834eb58f202f6cd30d857ef450bf826b4 (patch) | |
tree | 987983a6e8376948e5629b846ef25b263512b75e /mod/network.php | |
parent | a2e3ca6fd8ba8c0630de089d772fdd668b84428b (diff) | |
parent | b6b0e00f4c498ac2a9994c844d55098090952e6d (diff) | |
download | volse-hubzilla-b298bc8834eb58f202f6cd30d857ef450bf826b4.tar.gz volse-hubzilla-b298bc8834eb58f202f6cd30d857ef450bf826b4.tar.bz2 volse-hubzilla-b298bc8834eb58f202f6cd30d857ef450bf826b4.zip |
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'mod/network.php')
-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 ecbeb4085..f71a7569a 100644 --- a/mod/network.php +++ b/mod/network.php @@ -117,8 +117,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(); |