diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-01 12:28:50 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-01 12:28:50 +0000 |
commit | 2958890439f29b9cf45997c52c8cfa57e0f16bc8 (patch) | |
tree | 8a2703312cd3bc4b81f60e339351f72b1482a889 /phpBB/includes/functions_convert.php | |
parent | 6bc7e1516206862472091e53d8f3f357a755eac8 (diff) | |
download | forums-2958890439f29b9cf45997c52c8cfa57e0f16bc8.tar forums-2958890439f29b9cf45997c52c8cfa57e0f16bc8.tar.gz forums-2958890439f29b9cf45997c52c8cfa57e0f16bc8.tar.bz2 forums-2958890439f29b9cf45997c52c8cfa57e0f16bc8.tar.xz forums-2958890439f29b9cf45997c52c8cfa57e0f16bc8.zip |
Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9905 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r-- | phpBB/includes/functions_convert.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index f6710ded30..82ec114c09 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -551,7 +551,7 @@ function _import_check($config_var, $source, $use_target) ); // copy file will prepend $phpBB_root_path - $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); + $target = $config[$config_var] . '/' . utf8_basename(($use_target === false) ? $source : $use_target); if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0) { @@ -567,11 +567,11 @@ function _import_check($config_var, $source, $use_target) if ($result['copied']) { - $result['target'] = basename($target); + $result['target'] = utf8_basename($target); } else { - $result['target'] = ($use_target !== false) ? $result['orig_source'] : basename($target); + $result['target'] = ($use_target !== false) ? $result['orig_source'] : utf8_basename($target); } return $result; @@ -600,7 +600,7 @@ function import_attachment($source, $use_target = false) { $thumb_dir = $convert->convertor['thumbnails'][0]; $thumb_prefix = $convert->convertor['thumbnails'][1]; - $thumb_source = $thumb_dir . $thumb_prefix . basename($result['source']); + $thumb_source = $thumb_dir . $thumb_prefix . utf8_basename($result['source']); if (strpos($thumb_source, $convert->convertor['upload_path']) !== 0) { @@ -2257,7 +2257,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour if (substr($trg, -1) == '/') { - $trg .= basename($src); + $trg .= utf8_basename($src); } $src_path = relative_base($src, $source_relative_path, __LINE__, __FILE__); $trg_path = $trg; |