mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
- removed download mode selection (the column info and constants will not be removed, we or others may be able to re-use them later on)
- removing extension from physical filename for uploaded attachments (as has been suggested some time ago from our community), can still be used by using the new 'unique_ext' mode on file cleaning - fixed a bug with copying attachments if copying a topic - made sure no attachment files get removed used at another location - changed media player "embed" code. For some this may result in no auto-resizing - though a download link has been added. git-svn-id: file:///svn/phpbb/trunk@6831 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -2463,7 +2463,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
global $extensions, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
//
|
||||
$force_physical = false;
|
||||
$compiled_attachments = array();
|
||||
|
||||
if (!isset($template->filename['attachment_tpl']))
|
||||
@@ -2631,7 +2630,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
||||
}
|
||||
|
||||
$download_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id) : $filename;
|
||||
$download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id);
|
||||
|
||||
switch ($display_cat)
|
||||
{
|
||||
@@ -2649,7 +2648,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
// Images, but display Thumbnail
|
||||
case ATTACHMENT_CATEGORY_THUMB:
|
||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||
$thumbnail_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . (int) $forum_id) : $thumbnail_filename;
|
||||
$thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . (int) $forum_id);
|
||||
|
||||
$block_array += array(
|
||||
'S_THUMBNAIL' => true,
|
||||
@@ -2663,10 +2662,11 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
|
||||
// Giving the filename directly because within the wm object all variables are in local context making it impossible
|
||||
// to validate against a valid session (all params can differ)
|
||||
$download_link = $filename;
|
||||
// $download_link = $filename;
|
||||
|
||||
$block_array += array(
|
||||
'U_FORUM' => generate_board_url(),
|
||||
'ATTACH_ID' => $attachment['attach_id'],
|
||||
'S_WM_FILE' => true,
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user