[ticket/420] Correctly exclude forums user has no access to
B3P-420
This commit is contained in:
@@ -130,7 +130,7 @@ class announcements extends module_base
|
|||||||
$this->config['board3_announcements_day_' . $module_id],
|
$this->config['board3_announcements_day_' . $module_id],
|
||||||
'announcements',
|
'announcements',
|
||||||
$start,
|
$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.
|
// Any announcements present? If not terminate it here.
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class news extends module_base
|
|||||||
0,
|
0,
|
||||||
($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news',
|
($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news',
|
||||||
$start,
|
$start,
|
||||||
$this->config['board3_news_exclude_' . $module_id]
|
(bool) $this->config['board3_news_exclude_' . $module_id]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Any news present? If not terminate it here.
|
// Any news present? If not terminate it here.
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ class fetch_posts
|
|||||||
*/
|
*/
|
||||||
protected function set_forum_constraints($forum_from, $disallowed_forums, $invert = false)
|
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);
|
$access_list = array_merge($disallowed_forums, $forum_from);
|
||||||
$sql_operator = '<>';
|
$sql_operator = '<>';
|
||||||
|
|||||||
Reference in New Issue
Block a user