diff options
author | qichengzx <qichengzx@gmail.com> | 2018-02-13 03:57:26 +0100 |
---|---|---|
committer | qichengzx <qichengzx@gmail.com> | 2018-02-13 03:57:26 +0100 |
commit | baeb6e3697a87f42fda49c31bdb0b3f5169d64ac (patch) | |
tree | ab63de137a0d46fcbb2012c28c4195c176380ccd | |
parent | b8166baf08d2c7a9fa7565b355324f347ae043f9 (diff) | |
parent | c82f3236069fae1f21a0900b026d346752d089c9 (diff) |
Merge branch 'develop' of github.com:bcit-ci/CodeIgniter into develop
-rw-r--r-- | system/helpers/download_helper.php | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index b7a5336b6..000e4c707 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -149,19 +149,10 @@ if ( ! function_exists('force_download')) // RFC 6266 allows for multibyte filenames, but only in UTF-8, // so we have to make it conditional ... - $utf8_filename = $filename; $charset = strtoupper(config_item('charset')); - if ($charset !== 'UTF-8') - { - $utf8_filename = (UTF8_ENABLED === TRUE) - ? get_instance()->utf8->convert_to_utf8($filename, $charset) - : FALSE; - } - else - { - $utf8_filename = $filename; - } - + $utf8_filename = ($charset !== 'UTF-8') + ? $utf8_filename = get_instance()->utf8->convert_to_utf8($filename, $charset) + : $filename; isset($utf8_filename[0]) && $utf8_filename = " filename*=UTF-8''".rawurlencode($utf8_filename); // Generate the server headers |