mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
[ticket/14101] Add core event to the download/file.php
PHPBB3-14101
This commit is contained in:
parent
e466318dc2
commit
e22dbbc7e8
1 changed files with 24 additions and 0 deletions
|
@ -250,6 +250,30 @@ else
|
||||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
$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)
|
if ($thumbnail)
|
||||||
{
|
{
|
||||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue