diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-02-24 10:54:51 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-02-24 10:54:51 +0100 |
| commit | cf5253c7b8407b7ff1c998aae9408c112b90cf05 (patch) | |
| tree | d3d0f95a05dea98bf702d140212678831d24b900 /phpBB/download/file.php | |
| parent | ba41e45f84027ebcf8d5118f909cee2bf0b4ddd5 (diff) | |
| parent | 5e2bbdb22b82102c9bb2a1f040ad2755e545941e (diff) | |
| download | forums-cf5253c7b8407b7ff1c998aae9408c112b90cf05.tar forums-cf5253c7b8407b7ff1c998aae9408c112b90cf05.tar.gz forums-cf5253c7b8407b7ff1c998aae9408c112b90cf05.tar.bz2 forums-cf5253c7b8407b7ff1c998aae9408c112b90cf05.tar.xz forums-cf5253c7b8407b7ff1c998aae9408c112b90cf05.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10056] Corrected a typo in Firebird name.
[ticket/10041] Use send_status_line more in download/file.php
Conflicts:
phpBB/download/file.php
Diffstat (limited to 'phpBB/download/file.php')
| -rw-r--r-- | phpBB/download/file.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 48110dbae3..5016e7f549 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -136,11 +136,13 @@ $user->setup('viewtopic'); if (!$download_id) { + send_status_line(404, 'Not Found'); trigger_error('NO_ATTACHMENT_SELECTED'); } if (!$config['allow_attachments'] && !$config['allow_pm_attach']) { + send_status_line(404, 'Not Found'); trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED'); } @@ -153,11 +155,13 @@ $db->sql_freeresult($result); if (!$attachment) { + send_status_line(404, 'Not Found'); trigger_error('ERROR_NO_ATTACHMENT'); } if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach'])) { + send_status_line(404, 'Not Found'); trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED'); } @@ -170,6 +174,7 @@ if ($attachment['is_orphan']) if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download'))) { + send_status_line(404, 'Not Found'); trigger_error('ERROR_NO_ATTACHMENT'); } @@ -202,6 +207,7 @@ else } else { + send_status_line(403, 'Forbidden'); trigger_error('SORRY_AUTH_VIEW_ATTACH'); } } @@ -242,6 +248,7 @@ else $extensions = array(); if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions)) { + send_status_line(404, 'Forbidden'); trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension'])); } } @@ -264,6 +271,7 @@ $db->sql_freeresult($result); if (!$attachment) { + send_status_line(404, 'Not Found'); trigger_error('ERROR_NO_ATTACHMENT'); } @@ -306,6 +314,7 @@ else // This presenting method should no longer be used if (!@is_dir($phpbb_root_path . $config['upload_path'])) { + send_status_line(500, 'Internal Server Error'); trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']); } |
