1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/17357] Remove file_info from storage

PHPBB-17357
This commit is contained in:
Ruben Calvo
2024-06-30 13:59:41 +02:00
parent 1dacbf6bde
commit 877e364cbd
16 changed files with 118 additions and 281 deletions

View File

@@ -173,8 +173,6 @@ class acp_attachments
'img_max_width' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'img_max_height' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'img_link_width' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'img_link_height' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@@ -197,7 +195,6 @@ class acp_attachments
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_strip_metadata' => array('lang' => 'IMAGE_STRIP_METADATA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_quality' => array('lang' => 'IMAGE_QUALITY', 'validate' => 'int:50:90', 'type' => 'number:50:90', 'explain' => true, 'append' => ' %'),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);

View File

@@ -1260,19 +1260,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
{
if ($config['img_display_inlined'])
{
if ($config['img_link_width'] || $config['img_link_height'])
{
try
{
$file_info = $storage_attachment->file_info($filename);
$display_cat = ($file_info->image_width <= $config['img_link_width'] && $file_info->image_height <= $config['img_link_height']) ? attachment_category::IMAGE : attachment_category::NONE;
}
catch (\Exception $e)
{
$display_cat = attachment_category::NONE;
}
}
$display_cat = attachment_category::IMAGE;
}
else
{

View File

@@ -361,8 +361,6 @@ class phpbb_questionnaire_phpbb_data_provider
'hot_threshold' => true,
'img_create_thumbnail' => true,
'img_display_inlined' => true,
'img_link_height' => true,
'img_link_width' => true,
'img_max_height' => true,
'img_max_thumb_width' => true,
'img_max_width' => true,