mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #5242 from rubencm/ticket/15688
[ticket/15688] Fix event location in attachments download
This commit is contained in:
commit
1491ce875d
1 changed files with 10 additions and 10 deletions
|
@ -266,6 +266,16 @@ else
|
||||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
$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 = '';
|
$redirect = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,16 +304,6 @@ else
|
||||||
);
|
);
|
||||||
extract($phpbb_dispatcher->trigger_event('core.download_file_send_to_browser_before', compact($vars)));
|
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))
|
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']);
|
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
||||||
|
|
Loading…
Add table
Reference in a new issue