1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-23 11:28:33 +01:00

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
This commit is contained in:
Dhruv 2013-06-13 22:12:39 +05:30
commit 86583754c3
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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));