[ticket/420] Correctly exclude forums user has no access to

B3P-420
This commit is contained in:
Marc Alexander
2014-11-23 15:34:48 +01:00
parent e26ffa88b8
commit 5f55b9026b
3 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 = '<>';