mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user