mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 21:10:31 +02:00
[ticket/16712] Implement thumbnails for WEBP images in attachments
Use short array syntax PHPBB3-16712
This commit is contained in:
@@ -551,8 +551,8 @@ function get_supported_image_types($type = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$new_type = array();
|
$new_type = [];
|
||||||
$go_through_types = array(IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP, IMG_WEBP);
|
$go_through_types = [IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP, IMG_WEBP];
|
||||||
|
|
||||||
foreach ($go_through_types as $check_type)
|
foreach ($go_through_types as $check_type)
|
||||||
{
|
{
|
||||||
@@ -563,14 +563,14 @@ function get_supported_image_types($type = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return [
|
||||||
'gd' => ($new_type) ? true : false,
|
'gd' => ($new_type) ? true : false,
|
||||||
'format' => $new_type,
|
'format' => $new_type,
|
||||||
'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1
|
'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return array('gd' => false);
|
return ['gd' => false];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user