aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-21 16:47:46 -0700
committerfriendica <info@friendica.com>2015-03-21 16:47:46 -0700
commitb298bc8834eb58f202f6cd30d857ef450bf826b4 (patch)
tree987983a6e8376948e5629b846ef25b263512b75e /mod
parenta2e3ca6fd8ba8c0630de089d772fdd668b84428b (diff)
parentb6b0e00f4c498ac2a9994c844d55098090952e6d (diff)
downloadvolse-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')
-rw-r--r--mod/network.php17
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();