From 5f55b9026b5ce2d9f172df3e33c5fc2c99186515 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 23 Nov 2014 15:34:48 +0100 Subject: [PATCH] [ticket/420] Correctly exclude forums user has no access to B3P-420 --- modules/announcements.php | 2 +- modules/news.php | 2 +- portal/fetch_posts.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/announcements.php b/modules/announcements.php index 5bf1049c..ebcfd7c4 100644 --- a/modules/announcements.php +++ b/modules/announcements.php @@ -130,7 +130,7 @@ class announcements extends module_base $this->config['board3_announcements_day_' . $module_id], 'announcements', $start, - $this->config['board3_announcements_forum_exclude_' . $module_id] + (bool) $this->config['board3_announcements_forum_exclude_' . $module_id] ); // Any announcements present? If not terminate it here. diff --git a/modules/news.php b/modules/news.php index daa54a29..78071786 100644 --- a/modules/news.php +++ b/modules/news.php @@ -132,7 +132,7 @@ class news extends module_base 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, - $this->config['board3_news_exclude_' . $module_id] + (bool) $this->config['board3_news_exclude_' . $module_id] ); // Any news present? If not terminate it here. diff --git a/portal/fetch_posts.php b/portal/fetch_posts.php index 124428b8..59d48903 100644 --- a/portal/fetch_posts.php +++ b/portal/fetch_posts.php @@ -440,7 +440,7 @@ class fetch_posts */ protected function set_forum_constraints($forum_from, $disallowed_forums, $invert = false) { - if ($invert == true) + if ($invert == true || empty($forum_from)) { $access_list = array_merge($disallowed_forums, $forum_from); $sql_operator = '<>';