mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/14285] Move code to increment download count
PHPBB3-14285
This commit is contained in:
parent
af222e73f3
commit
469f139a2f
1 changed files with 5 additions and 7 deletions
|
@ -151,19 +151,17 @@ class attachment extends controller
|
|||
|
||||
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
||||
|
||||
if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$this->user->optionget('viewimg'))
|
||||
{
|
||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
||||
}
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||
}
|
||||
else if ($display_cat == ATTACHMENT_CATEGORY_NONE && !$attachment['is_orphan'])
|
||||
{
|
||||
// Update download count
|
||||
$this->phpbb_increment_downloads($attachment['attach_id']);
|
||||
if (!(($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$this->user->optionget('viewimg')))
|
||||
{
|
||||
// Update download count
|
||||
$this->phpbb_increment_downloads($attachment['attach_id']);
|
||||
}
|
||||
}
|
||||
|
||||
$redirect = '';
|
||||
|
|
Loading…
Add table
Reference in a new issue