diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-06 20:53:46 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-06 20:53:46 +0000 |
| commit | dd9ad539fdab80badedf801a816b8a0beafbbf5c (patch) | |
| tree | db8ae8a184b060d5576604cc0dfa723773daedb8 /phpBB/download.php | |
| parent | 2c8afb820e3842bed2ab6cec4053e71b5c566985 (diff) | |
| download | forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.gz forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.bz2 forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.tar.xz forums-dd9ad539fdab80badedf801a816b8a0beafbbf5c.zip | |
ok, this one is rather large... the most important change:
re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different
apart from this, code cleanage, bug fixing, etc.
git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/download.php')
| -rw-r--r-- | phpBB/download.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/download.php b/phpBB/download.php index c7a1a46a5f..1fe953101a 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -14,7 +14,7 @@ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -include($phpbb_root_path . 'common.'.$phpEx); +include($phpbb_root_path . 'common.' . $phpEx); $download_id = request_var('id', 0); @@ -65,7 +65,7 @@ if (!$attachment['in_message']) $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if ($auth->acl_gets('f_download', 'u_download', $row['forum_id'])) + if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id'])) { if ($row['forum_password']) { @@ -138,7 +138,7 @@ if ($download_mode == PHYSICAL_LINK) trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']); } - redirect($config['upload_path'] . '/' . $attachment['physical_filename']); + redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']); exit; } else @@ -234,10 +234,10 @@ function send_file_to_browser($attachment, $upload_dir, $category) // PHP track_errors setting On? if (!empty($php_errormsg)) { - trigger_error('Unable to deliver file.<br />Error was: ' . $php_errormsg, E_USER_WARNING); + trigger_error('Unable to deliver file.<br />Error was: ' . $php_errormsg, E_USER_ERROR); } - trigger_error('Unable to deliver file.', E_USER_WARNING); + trigger_error('Unable to deliver file.', E_USER_ERROR); } flush(); @@ -342,7 +342,6 @@ function download_allowed() } } } - $db->sql_freeresult($result); } |
