| @@ 1655-1665 (lines=11) @@ | ||
| 1652 | $disposition = !isset($_REQUEST['image']) ? 'attachment' : 'inline'; |
|
| 1653 | ||
| 1654 | // Different browsers like different standards... |
|
| 1655 | if (isBrowser('firefox')) |
|
| 1656 | header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name))); |
|
| 1657 | ||
| 1658 | elseif (isBrowser('opera')) |
|
| 1659 | header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name) . '"'); |
|
| 1660 | ||
| 1661 | elseif (isBrowser('ie')) |
|
| 1662 | header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)) . '"'); |
|
| 1663 | ||
| 1664 | else |
|
| 1665 | header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"'); |
|
| 1666 | ||
| 1667 | // If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE. |
|
| 1668 | if (!isset($_REQUEST['image']) && in_array($file_ext, array('gif', 'jpg', 'bmp', 'png', 'jpeg', 'tiff'))) |
|
| @@ 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'))) |
|