aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-12-12 14:07:02 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-12-12 14:07:02 +0000
commit20d18e1a9fec071d6e2e519709b08bacf650d750 (patch)
treee6f71aa6625aae6ef8602b42716a7e531662c626 /phpBB/includes/functions_display.php
parentaf82f666589ab73e2e2727015d82c611c93a9c6a (diff)
downloadforums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.gz
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.bz2
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.tar.xz
forums-20d18e1a9fec071d6e2e519709b08bacf650d750.zip
- fix attachment mod errors
- make upload path consistent with all other 2.2 path settings - fix "post title wrong after split" bug git-svn-id: file:///svn/phpbb/trunk@5032 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index a37b9c77be..70636a8962 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -535,8 +535,8 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
{
// Some basics...
$attachment['extension'] = strtolower(trim($attachment['extension']));
- $filename = $config['upload_dir'] . '/' . $attachment['physical_filename'];
- $thumbnail_filename = $config['upload_dir'] . '/thumb_' . $attachment['physical_filename'];
+ $filename = $phpbb_root_path . $config['upload_dir'] . '/' . basename($attachment['physical_filename']);
+ $thumbnail_filename = $phpbb_root_path . $config['upload_dir'] . '/thumb_' . basename($attachment['physical_filename']);
$upload_image = '';
@@ -554,7 +554,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
$filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize);
- $display_name = $attachment['real_filename'];
+ $display_name = basename($attachment['real_filename']);
$comment = str_replace("\n", '<br />', censor_text($attachment['comment']));
$denied = false;