diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-12-27 14:15:27 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-27 14:15:27 +0100 |
commit | 6acfe2a0cb584de823bc0633e6a864180effebf8 (patch) | |
tree | 38fd99900468ccea5ea20a59fa299cb4c3d08dc8 /phpBB/download | |
parent | cb233c862babd5492d34ad8adcf384b28a28fb75 (diff) | |
parent | dc48f28da1d4ff4ae2956648c70b8291de1d904e (diff) | |
download | forums-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/download')
-rw-r--r-- | phpBB/download/file.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index a9cd4a3b3c..9ee489cef4 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -159,6 +159,8 @@ $user->session_begin(false); $auth->acl($user->data); $user->setup('viewtopic'); +$phpbb_content_visibility = $phpbb_container->get('content.visibility'); + if (!$config['allow_attachments'] && !$config['allow_pm_attach']) { send_status_line(404, 'Not Found'); @@ -225,7 +227,7 @@ else $post_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if (!$post_row || ($post_row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $post_row['forum_id']))) + if (!$post_row || !$phpbb_content_visibility->is_visible('post', $post_row['forum_id'], $post_row)) { // Attachment of a soft deleted post and the user is not allowed to see the post send_status_line(404, 'Not Found'); |