mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-24 01:20:40 +01:00
Merge pull request #5242 from rubencm/ticket/15688
[ticket/15688] Fix event location in attachments download
This commit is contained in:
commit
1491ce875d
@ -266,6 +266,16 @@ else
|
||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
||||
}
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||
}
|
||||
else if ($display_cat == ATTACHMENT_CATEGORY_NONE && !$attachment['is_orphan'] && !phpbb_http_byte_range($attachment['filesize']))
|
||||
{
|
||||
// Update download count
|
||||
phpbb_increment_downloads($db, $attachment['attach_id']);
|
||||
}
|
||||
|
||||
$redirect = '';
|
||||
|
||||
/**
|
||||
@ -294,16 +304,6 @@ else
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.download_file_send_to_browser_before', compact($vars)));
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||
}
|
||||
else if ($display_cat == ATTACHMENT_CATEGORY_NONE && !$attachment['is_orphan'] && !phpbb_http_byte_range($attachment['filesize']))
|
||||
{
|
||||
// Update download count
|
||||
phpbb_increment_downloads($db, $attachment['attach_id']);
|
||||
}
|
||||
|
||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && (strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($user->browser, 7))
|
||||
{
|
||||
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user