aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/mcp/mcp_front.php6
-rw-r--r--phpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php11
-rw-r--r--phpBB/includes/mcp/mcp_reports.php11
4 files changed, 26 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index d0278cc44c..c63f18d562 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -27,7 +27,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 unapproved
if ($module->loaded('queue'))
{
- $forum_list = get_forum_list('m_approve');
+ $forum_list = array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'));
$post_list = array();
$forum_names = array();
@@ -143,7 +143,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 reported
if ($module->loaded('reports'))
{
- $forum_list = get_forum_list('m_report');
+ $forum_list = array_intersect(get_forum_list('f_read'), get_forum_list('m_report'));
$template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false);
@@ -246,7 +246,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 logs
if ($module->loaded('logs'))
{
- $forum_list = get_forum_list('m_');
+ $forum_list = array_intersect(get_forum_list('f_read'), get_forum_list('m_'));
if (!empty($forum_list))
{
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 6c20cf85b4..c1438d4a2d 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -63,7 +63,7 @@ class mcp_logs
$this->tpl_name = 'mcp_logs';
$this->page_title = 'MCP_LOGS';
- $forum_list = get_forum_list('m_');
+ $forum_list = array_intersect(get_forum_list('f_read'), get_forum_list('m_'));
$forum_list[] = 0;
$forum_id = $topic_id = 0;
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 665d7da20b..1e368c4fc6 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -242,6 +242,17 @@ class mcp_queue
}
$forum_list_approve = get_forum_list('m_approve', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_approve as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_approve[$k]);
+ }
+ }
+ unset($forum_list_read);
if (!$forum_id)
{
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 1f1eb37b46..27d841c81b 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -246,6 +246,17 @@ class mcp_reports
$forum_info = array();
$forum_list_reports = get_forum_list('m_report', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_reports as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_reports[$k]);
+ }
+ }
+ unset($forum_list_read);
if ($topic_id && $forum_id)
{