mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[ticket/10820] remove unnecessary condition checks
PHPBB3-10820
This commit is contained in:
parent
8759147674
commit
07c62dd64f
@ -344,7 +344,7 @@ function send_avatar_to_browser($file, $browser)
|
|||||||
$image_data = @getimagesize($file_path);
|
$image_data = @getimagesize($file_path);
|
||||||
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
||||||
|
|
||||||
if (strpos(strtolower($browser), 'msie') !== false && !phpbb_is_greater_ie7($browser))
|
if (!phpbb_is_greater_ie7($browser))
|
||||||
{
|
{
|
||||||
header('Content-Disposition: attachment; ' . header_filename($file));
|
header('Content-Disposition: attachment; ' . header_filename($file));
|
||||||
|
|
||||||
@ -491,7 +491,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($user->browser) || (!phpbb_is_greater_ie7($user->browser) && (strpos(strtolower($user->browser), 'msie') !== false)))
|
if (empty($user->browser) || !phpbb_is_greater_ie7($user->browser))
|
||||||
{
|
{
|
||||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user