aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-08-01 12:28:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-08-01 12:28:50 +0000
commit2958890439f29b9cf45997c52c8cfa57e0f16bc8 (patch)
tree8a2703312cd3bc4b81f60e339351f72b1482a889 /phpBB/includes/functions_content.php
parent6bc7e1516206862472091e53d8f3f357a755eac8 (diff)
downloadforums-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_content.php')
-rw-r--r--phpBB/includes/functions_content.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index de5df37299..c4ac48e8e8 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -841,8 +841,8 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
// Some basics...
$attachment['extension'] = strtolower(trim($attachment['extension']));
- $filename = $phpbb_root_path . $config['upload_path'] . '/' . basename($attachment['physical_filename']);
- $thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . basename($attachment['physical_filename']);
+ $filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);
+ $thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . utf8_basename($attachment['physical_filename']);
$upload_icon = '';
@@ -866,7 +866,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
'UPLOAD_ICON' => $upload_icon,
'FILESIZE' => $filesize['value'],
'SIZE_LANG' => $filesize['unit'],
- 'DOWNLOAD_NAME' => basename($attachment['real_filename']),
+ 'DOWNLOAD_NAME' => utf8_basename($attachment['real_filename']),
'COMMENT' => $comment,
);