diff options
author | Chris Smith <toonarmy@phpbb.com> | 2008-10-14 18:29:50 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2008-10-14 18:29:50 +0000 |
commit | bc2f055ccd3be52337d64af34aa685b5859ac850 (patch) | |
tree | 3045fb3f4c589ca8fb7bb61e7e7f92e60be85bda /phpBB/mcp.php | |
parent | 02dd8c52c2150ebf2e1f85032bcdf2924d00557b (diff) | |
download | forums-bc2f055ccd3be52337d64af34aa685b5859ac850.tar forums-bc2f055ccd3be52337d64af34aa685b5859ac850.tar.gz forums-bc2f055ccd3be52337d64af34aa685b5859ac850.tar.bz2 forums-bc2f055ccd3be52337d64af34aa685b5859ac850.tar.xz forums-bc2f055ccd3be52337d64af34aa685b5859ac850.zip |
Moderators can only see reports/queue/logs from forums they can actually read. #31085
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9015 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r-- | phpBB/mcp.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 5e8102d774..47578c3532 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -612,7 +612,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, $sql = 'SELECT COUNT(post_id) AS total FROM ' . POSTS_TABLE . " - $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . ' + $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . ' AND post_approved = 0'; if ($min_time) @@ -628,7 +628,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, $sql = 'SELECT COUNT(topic_id) AS total FROM ' . TOPICS_TABLE . " - $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . ' + $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . ' AND topic_approved = 0'; if ($min_time) @@ -654,7 +654,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, } else { - $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list('!m_report'), true, true); + $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true); } if ($mode == 'reports') @@ -680,7 +680,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, $sql = 'SELECT COUNT(log_id) AS total FROM ' . LOG_TABLE . " - $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_')) . ' + $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_'))) . ' AND log_time >= ' . $min_time . ' AND log_type = ' . LOG_MOD; break; |