mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/15286] Remove download_mode
PHPBB3-15286
This commit is contained in:
@@ -254,7 +254,6 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
|
||||
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
||||
|
||||
if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
|
||||
@@ -274,7 +273,6 @@ else
|
||||
* @var int attach_id The attachment ID
|
||||
* @var array attachment Array with attachment data
|
||||
* @var int display_cat Attachment category
|
||||
* @var int download_mode File extension specific download mode
|
||||
* @var array extensions Array with file extensions data
|
||||
* @var string mode Download mode
|
||||
* @var bool thumbnail Flag indicating if the file is a thumbnail
|
||||
@@ -285,7 +283,6 @@ else
|
||||
'attach_id',
|
||||
'attachment',
|
||||
'display_cat',
|
||||
'download_mode',
|
||||
'extensions',
|
||||
'mode',
|
||||
'thumbnail',
|
||||
@@ -309,24 +306,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Determine the 'presenting'-method
|
||||
if ($download_mode == PHYSICAL_LINK)
|
||||
{
|
||||
// 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']);
|
||||
}
|
||||
|
||||
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
|
||||
file_gc();
|
||||
}
|
||||
else
|
||||
{
|
||||
send_file_to_browser($attachment, $display_cat);
|
||||
file_gc();
|
||||
}
|
||||
send_file_to_browser($attachment, $display_cat);
|
||||
file_gc();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user