mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
Some... fixes... laying around here.
git-svn-id: file:///svn/phpbb/trunk@6970 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user