mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update dl.php
This commit is contained in:
parent
f1bfe9ca58
commit
72d677588b
12
dl.php
12
dl.php
@ -107,6 +107,12 @@ if (!($attachment = DB()->sql_fetchrow($result)))
|
||||
|
||||
$attachment['physical_filename'] = basename($attachment['physical_filename']);
|
||||
|
||||
// Re-define download mode for thumbnails
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = THUMB_DIR . '/t_' . $attachment['physical_filename'];
|
||||
}
|
||||
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
// get forum_id for attachment authorization or private message authorization
|
||||
@ -201,16 +207,12 @@ if (!in_array($attachment['extension'], $allowed_extensions))
|
||||
bb_die(sprintf($lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']) . "<br /><br />" . $lang['FILENAME'] . ": " . $attachment['physical_filename']);
|
||||
}
|
||||
|
||||
// Getting download mode by extension
|
||||
if (!$download_mode = intval($download_mode[$attachment['extension']]))
|
||||
{
|
||||
bb_die('Incorrect download mode');
|
||||
}
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = THUMB_DIR . '/t_' . $attachment['physical_filename'];
|
||||
}
|
||||
|
||||
// Update download count
|
||||
if (!$thumbnail)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user