diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-06-13 22:12:39 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-06-13 22:12:39 +0530 |
commit | 86583754c310b67115df04386b633cdea9650732 (patch) | |
tree | 11dd71777b270a66a9f0c84a2ea2c95d6679da61 | |
parent | 773bcc1c9bdf68925587c2ca6634938f29210365 (diff) | |
parent | 48f764437f3398696ad21177da02e024cc5804e5 (diff) | |
download | forums-86583754c310b67115df04386b633cdea9650732.tar forums-86583754c310b67115df04386b633cdea9650732.tar.gz forums-86583754c310b67115df04386b633cdea9650732.tar.bz2 forums-86583754c310b67115df04386b633cdea9650732.tar.xz forums-86583754c310b67115df04386b633cdea9650732.zip |
Merge branch 'ticket/10820' into ticket/10820-develop
# By Dhruv (13) and riadhchtara (1)
* ticket/10820:
[ticket/10820] Add additional check for IE in condition
[ticket/10820] Fix function docblock
[ticket/10820] Inject IE version in function
[ticket/10820] fix regex Extract IE version from user agent string and then compare it with 7
[ticket/10820] remove unnecessary parentheses
[ticket/10820] fix docblock
[ticket/10820] add param and return to function
[ticket/10820] simplify regex and escape dot
[ticket/10820] Use singular return
[ticket/10820] remove unnecessary condition checks
[ticket/10820] add function docblock
[ticket/10820] fix IE check function
[ticket/10820] proper usage of global and local variable browser
[ticket/10820] Image downloader recognize new version of ie When a user download image attachement using ie8, the file is displayed. However, when he uses ie version greater than 8, the image is download. A changes are made to phpbb/download/file.php to solve the problem. We check now if the ie version is greater or equal to 8 and not only equal to 8
Conflicts:
phpBB/download/file.php
-rw-r--r-- | phpBB/download/file.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_download.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 3a28f282bd..cf7128b25b 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -279,7 +279,7 @@ else if ($download_id) phpbb_increment_downloads($db, $attachment['attach_id']); } - if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && !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']); file_gc(); diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 14bba369c9..cae3b80fc5 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -46,7 +46,7 @@ function send_avatar_to_browser($file, $browser) $image_data = @getimagesize($file_path); header('Content-Type: ' . image_type_to_mime_type($image_data[2])); - if (!phpbb_is_greater_ie_version($browser, 7)) + if ((strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($browser, 7)) { header('Content-Disposition: attachment; ' . header_filename($file)); |