aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-08-22 10:36:15 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-08-22 10:36:15 +0200
commiteb168913d9d00c9513ac5508034ac679afbf753c (patch)
tree81054301cd1c2e4d72ea09ef814968044c25e5e9 /phpBB/download
parentfdca5532e6cf3245f70ab185821c5b1b0ff83dba (diff)
parentf2a0fe39a5857ce9ffdf25a5601bb2ef6e02c3ae (diff)
downloadforums-eb168913d9d00c9513ac5508034ac679afbf753c.tar
forums-eb168913d9d00c9513ac5508034ac679afbf753c.tar.gz
forums-eb168913d9d00c9513ac5508034ac679afbf753c.tar.bz2
forums-eb168913d9d00c9513ac5508034ac679afbf753c.tar.xz
forums-eb168913d9d00c9513ac5508034ac679afbf753c.zip
Merge branch '3.1.x'
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 9d54b824f8..fb2b9602cd 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -260,6 +260,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'];