1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

Merge pull request #6664 from rubencm/ticket/17357

[ticket/17357] Remove file_info from storage
This commit is contained in:
Marc Alexander
2024-09-25 17:07:04 +02:00
committed by GitHub
17 changed files with 123 additions and 287 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

@@ -1234,19 +1234,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,