aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-11-16 21:53:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-11-16 21:53:56 +0000
commit306d36f03dadde4ed99410ea907ec82cef1848b6 (patch)
tree3828d33092e95fcfd30659997a65ffc5e5e01e04 /phpBB/download.php
parente80f40d5bb754aaa720c9e240e6310bff76cea70 (diff)
downloadforums-306d36f03dadde4ed99410ea907ec82cef1848b6.tar
forums-306d36f03dadde4ed99410ea907ec82cef1848b6.tar.gz
forums-306d36f03dadde4ed99410ea907ec82cef1848b6.tar.bz2
forums-306d36f03dadde4ed99410ea907ec82cef1848b6.tar.xz
forums-306d36f03dadde4ed99410ea907ec82cef1848b6.zip
Finished drafts, one bit is remaining though.
added file and disk space statistics. some minor changes here and there. git-svn-id: file:///svn/phpbb/trunk@4668 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/download.php')
-rw-r--r--phpBB/download.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/phpBB/download.php b/phpBB/download.php
index c728777d02..ad82f0534c 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -78,11 +78,10 @@ if (!in_array($attachment['extension'], $extensions['_allowed_']))
}
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
-$upload_dir = ($config['upload_dir'][0] == '/' || ($config['upload_dir'][0] != '/' && $config['upload_dir'][1] == ':')) ? $config['upload_dir'] : $phpbb_root_path . $config['upload_dir'];
if ($thumbnail)
{
- $attachment['physical_filename'] = 'thumbs/t_' . $attachment['physical_filename'];
+ $attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
}
else
{
@@ -96,16 +95,16 @@ else
// Determine the 'presenting'-method
if ($download_mode == PHYSICAL_LINK)
{
- if (!@is_dir($upload_dir))
+ if (!@is_dir($config['upload_dir']))
{
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
}
- redirect($upload_dir . '/' . $attachment['physical_filename']);
+ redirect($config['upload_dir'] . '/' . $attachment['physical_filename']);
}
else
{
- send_file_to_browser($attachment, $upload_dir, $extensions[$attachment['extension']]['display_cat']);
+ send_file_to_browser($attachment, $config['upload_dir'], $extensions[$attachment['extension']]['display_cat']);
exit;
}