aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_mcp.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-12-27 14:15:27 +0100
committerMarc Alexander <admin@m-a-styles.de>2017-12-27 14:15:27 +0100
commit6acfe2a0cb584de823bc0633e6a864180effebf8 (patch)
tree38fd99900468ccea5ea20a59fa299cb4c3d08dc8 /phpBB/includes/functions_mcp.php
parentcb233c862babd5492d34ad8adcf384b28a28fb75 (diff)
parentdc48f28da1d4ff4ae2956648c70b8291de1d904e (diff)
downloadforums-6acfe2a0cb584de823bc0633e6a864180effebf8.tar
forums-6acfe2a0cb584de823bc0633e6a864180effebf8.tar.gz
forums-6acfe2a0cb584de823bc0633e6a864180effebf8.tar.bz2
forums-6acfe2a0cb584de823bc0633e6a864180effebf8.tar.xz
forums-6acfe2a0cb584de823bc0633e6a864180effebf8.zip
Merge pull request #4868 from javiexin/ticket/15266
[ticket/15266] Fix events in content_visibility
Diffstat (limited to 'phpBB/includes/functions_mcp.php')
-rw-r--r--phpBB/includes/functions_mcp.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index dfe3fefbd0..7ab2da8e5c 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -197,7 +197,7 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa
*/
function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false)
{
- global $db, $auth, $config, $user;
+ global $db, $auth, $config, $user, $phpbb_container;
$rowset = array();
@@ -246,6 +246,8 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
$result = $db->sql_query($sql);
unset($sql_array);
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
while ($row = $db->sql_fetchrow($result))
{
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
@@ -253,7 +255,7 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
continue;
}
- if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ if (!$phpbb_content_visibility->is_visible('post', $row['forum_id'], $row))
{
// Moderators without the permission to approve post should at least not see them. ;)
continue;