aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2015-08-15 16:34:30 +0700
committerrxu <rxu@mail.ru>2015-08-15 16:34:30 +0700
commite22dbbc7e8a96d160e5ef21cd530e54babb61a41 (patch)
tree1d60ca8ad2b388beffa95a5c7eece76b16d65897 /phpBB/download
parente466318dc26c9cf4f9dc8d42c2bb69983b89608f (diff)
downloadforums-e22dbbc7e8a96d160e5ef21cd530e54babb61a41.tar
forums-e22dbbc7e8a96d160e5ef21cd530e54babb61a41.tar.gz
forums-e22dbbc7e8a96d160e5ef21cd530e54babb61a41.tar.bz2
forums-e22dbbc7e8a96d160e5ef21cd530e54babb61a41.tar.xz
forums-e22dbbc7e8a96d160e5ef21cd530e54babb61a41.zip
[ticket/14101] Add core event to the download/file.php
PHPBB3-14101
Diffstat (limited to 'phpBB/download')
-rw-r--r--phpBB/download/file.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 77fb455bc1..3e7965899f 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -250,6 +250,30 @@ else
$display_cat = ATTACHMENT_CATEGORY_NONE;
}
+ /**
+ * Event to modify data before sending file to browser
+ *
+ * @event core.download_file_send_to_browser_before
+ * @var int attach_id The attachment ID
+ * @var array attachment Array with attachment data
+ * @var int display_cat Attachment category
+ * @var int download_mode File extension specific download mode
+ * @var array extension Array with file extensions data
+ * @var string mode Download mode
+ * @var bool thumbnail Flag indicating if the file is a thumbnail
+ * @since 3.1.6-RC1
+ */
+ $vars = array(
+ 'attach_id',
+ 'attachment',
+ 'display_cat',
+ 'download_mode',
+ 'extension',
+ 'mode',
+ 'thumbnail',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.download_file_send_to_browser_before', compact($vars)));
+
if ($thumbnail)
{
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];