1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16820] Move ATTACHMENT_CATEGORY_ constants to attachment namespace

PHPBB3-16820
This commit is contained in:
Marc Alexander
2021-10-10 17:52:42 +02:00
parent ddf8e8c9d1
commit b99cfd5caa
11 changed files with 86 additions and 37 deletions

View File

@@ -13,6 +13,7 @@
namespace phpbb\storage\controller;
use phpbb\attachment\attachment_category;
use phpbb\auth\auth;
use phpbb\cache\service;
use phpbb\config\config;
@@ -183,9 +184,9 @@ class attachment extends controller
{
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
}
else if ($display_cat == ATTACHMENT_CATEGORY_NONE && !$attachment['is_orphan'])
else if ($display_cat == attachment_category::NONE && !$attachment['is_orphan'])
{
if (!(($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$this->user->optionget('viewimg')))
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']);