aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-11-27 20:49:22 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-11-27 20:49:22 +0100
commitd8944728668bb5087192df7b94c7cfc99cdb55a2 (patch)
tree2c2f14508d8a3095bd6a7a2e3f4095cacaf4ffe1 /phpBB
parent0e8a573a7156e9318bc18fb99da6fa29e2c2c542 (diff)
parenta3faf1fefc884c55d870b5fbd0d7b19371907e6c (diff)
downloadforums-d8944728668bb5087192df7b94c7cfc99cdb55a2.tar
forums-d8944728668bb5087192df7b94c7cfc99cdb55a2.tar.gz
forums-d8944728668bb5087192df7b94c7cfc99cdb55a2.tar.bz2
forums-d8944728668bb5087192df7b94c7cfc99cdb55a2.tar.xz
forums-d8944728668bb5087192df7b94c7cfc99cdb55a2.zip
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_download.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index d61ce3d098..d68709f2f8 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -689,6 +689,8 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
*/
function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
{
+ global $phpbb_dispatcher;
+
if (!$auth->acl_get('u_pm_download'))
{
send_status_line(403, 'Forbidden');
@@ -697,6 +699,18 @@ function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
$allowed = phpbb_download_check_pm_auth($db, $user_id, $msg_id);
+ /**
+ * Event to modify PM attachments download auth
+ *
+ * @event core.modify_pm_attach_download_auth
+ * @var bool allowed Whether the user is allowed to download from that PM or not
+ * @var int msg_id The id of the PM to download from
+ * @var int user_id The user id for auth check
+ * @since 3.1.11-RC1
+ */
+ $vars = array('allowed', 'msg_id', 'user_id');
+ extract($phpbb_dispatcher->trigger_event('core.modify_pm_attach_download_auth', compact($vars)));
+
if (!$allowed)
{
send_status_line(403, 'Forbidden');