aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-02-06 19:09:43 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-02-06 19:09:43 +0000
commit333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440 (patch)
tree08a84c7c140f482b7e7917acc6bc6480e5b0ff43 /phpBB/download.php
parent10f775cb1cc44b083373543a6c08214d1dd291f0 (diff)
downloadforums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar
forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.gz
forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.bz2
forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.xz
forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.zip
Some... fixes... laying around here.
git-svn-id: file:///svn/phpbb/trunk@6970 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/download.php')
-rw-r--r--phpBB/download.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/phpBB/download.php b/phpBB/download.php
index 41d09287de..cec44eaf1c 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -265,21 +265,20 @@ function send_file_to_browser($attachment, $upload_dir, $category)
exit;
}
-/*
+/**
* Get a browser friendly UTF-8 encoded filename
*/
function header_filename($file)
{
// There be dragons here...
- // IE follows no RFC, follow the RFC for extended filename for the rest
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
+ // IE and Safari follows no RFC.
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false)
{
return "filename=" . rawurlencode($file);
}
- else
- {
- return "filename*=UTF-8''" . rawurlencode($file);
- }
+
+ // follow the RFC for extended filename for the rest
+ return "filename*=UTF-8''" . rawurlencode($file);
}
/**