diff --git a/.cliffignore b/.cliffignore index 2cb35e72e..c4b190b53 100644 --- a/.cliffignore +++ b/.cliffignore @@ -3,4 +3,4 @@ 2d53efc945c7747be1755d0b66557a86bdc12cbd 602137b65129b817811b80975a369ebde3270c6d 4eb26ae37e1f4c82a45961517ffeb54c20200408 -1073f190135f2098b75293a62608e2c45762d5cf +e59adce848a9e10ee5775254045cbbd915236b8b diff --git a/index.php b/index.php index 965378564..bc96573ee 100644 --- a/index.php +++ b/index.php @@ -80,6 +80,7 @@ $forum_name_html = $forums['forum_name_html']; $anon = GUEST_UID; $excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW); +$excluded_forums_array = $excluded_forums_csv ? explode(',', $excluded_forums_csv) : []; $only_new = $user->opt_js['only_new']; // Validate requested category id @@ -329,7 +330,7 @@ if ($bb_cfg['show_latest_news']) { $template->assign_vars(['SHOW_LATEST_NEWS' => true]); foreach ($latest_news as $news) { - if (in_array($news['forum_id'], $user->get_excluded_forums(AUTH_VIEW, 'array'))) { + if (in_array($news['forum_id'], $excluded_forums_array)) { continue; } @@ -352,7 +353,7 @@ if ($bb_cfg['show_network_news']) { $template->assign_vars(['SHOW_NETWORK_NEWS' => true]); foreach ($network_news as $net) { - if (in_array($net['forum_id'], $user->get_excluded_forums(AUTH_VIEW, 'array'))) { + if (in_array($net['forum_id'], $excluded_forums_array)) { continue; }