| @@ 264-274 (lines=11) @@ | ||
| 261 | $disposition = !isset($_REQUEST['image']) ? 'attachment' : 'inline'; |
|
| 262 | ||
| 263 | // Different browsers like different standards... |
|
| 264 | if (isBrowser('firefox')) |
|
| 265 | header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name))); |
|
| 266 | ||
| 267 | elseif (isBrowser('opera')) |
|
| 268 | header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name) . '"'); |
|
| 269 | ||
| 270 | elseif (isBrowser('ie')) |
|
| 271 | header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)) . '"'); |
|
| 272 | ||
| 273 | else |
|
| 274 | header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"'); |
|
| 275 | ||
| 276 | // If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE. |
|
| 277 | if (!isset($_REQUEST['image']) && in_array($file['fileext'], array('gif', 'jpg', 'bmp', 'png', 'jpeg', 'tiff'))) |
|
| @@ 1685-1695 (lines=11) @@ | ||
| 1682 | $disposition = !isset($_REQUEST['image']) ? 'attachment' : 'inline'; |
|
| 1683 | ||
| 1684 | // Different browsers like different standards... |
|
| 1685 | if (isBrowser('firefox')) |
|
| 1686 | header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name))); |
|
| 1687 | ||
| 1688 | elseif (isBrowser('opera')) |
|
| 1689 | header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name) . '"'); |
|
| 1690 | ||
| 1691 | elseif (isBrowser('ie')) |
|
| 1692 | header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)) . '"'); |
|
| 1693 | ||
| 1694 | else |
|
| 1695 | header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"'); |
|
| 1696 | ||
| 1697 | // If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE. |
|
| 1698 | if (!isset($_REQUEST['image']) && in_array($file_ext, array('gif', 'jpg', 'bmp', 'png', 'jpeg', 'tiff'))) |
|