mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/14285] Remove support for old browsers
PHPBB3-14285
This commit is contained in:
parent
0e92744fa4
commit
af222e73f3
1 changed files with 2 additions and 11 deletions
|
@ -186,7 +186,6 @@ class attachment extends controller
|
|||
$vars = array(
|
||||
'attach_id',
|
||||
'attachment',
|
||||
'display_cat',
|
||||
'extensions',
|
||||
'mode',
|
||||
'thumbnail',
|
||||
|
@ -199,7 +198,7 @@ class attachment extends controller
|
|||
return new RedirectResponse($redirect);
|
||||
}
|
||||
|
||||
$this->send_file_to_browser($attachment, $display_cat);
|
||||
$this->send_file_to_browser($attachment);
|
||||
|
||||
$time = new \Datetime();
|
||||
$this->response->setExpires($time->modify('+1 year'));
|
||||
|
@ -211,7 +210,7 @@ class attachment extends controller
|
|||
/**
|
||||
* Send file to browser
|
||||
*/
|
||||
protected function send_file_to_browser($attachment, $category)
|
||||
protected function send_file_to_browser($attachment)
|
||||
{
|
||||
$filename = $attachment['physical_filename'];
|
||||
|
||||
|
@ -220,13 +219,6 @@ class attachment extends controller
|
|||
throw new http_exception(404, 'ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
|
||||
// Correct the mime type - we force application/octetstream for all files, except images
|
||||
// Please do not change this, it is a security precaution
|
||||
if ($category != ATTACHMENT_CATEGORY_IMAGE || strpos($attachment['mimetype'], 'image') !== 0)
|
||||
{
|
||||
$attachment['mimetype'] = (strpos(strtolower($this->user->browser), 'msie') !== false || strpos(strtolower($this->user->browser), 'opera') !== false) ? 'application/octetstream' : 'application/octet-stream';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to alter attachment before it is sent to browser.
|
||||
*
|
||||
|
@ -238,7 +230,6 @@ class attachment extends controller
|
|||
*/
|
||||
$vars = array(
|
||||
'attachment',
|
||||
'category',
|
||||
'filename',
|
||||
);
|
||||
extract($this->dispatcher->trigger_event('core.send_file_to_browser_before', compact($vars)));
|
||||
|
|
Loading…
Add table
Reference in a new issue