mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
[feature/avatars] Move list of supported formats to avatar driver class
Using the regex and turning it into an array if necessary seemed like the cleanest approach to achieve this. PHPBB3-10018
This commit is contained in:
@@ -162,7 +162,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
|
||||
$image = $file_info->getFilename();
|
||||
|
||||
// Match all images in the gallery folder
|
||||
if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $image) && is_file($file_path . '/' . $image))
|
||||
if (preg_match('#^[^&\'"<>]+\.(?:'. self::REGEX_ALLOWED_EXT . ')$#i', $image) && is_file($file_path . '/' . $image))
|
||||
{
|
||||
if (function_exists('getimagesize'))
|
||||
{
|
||||
|
Reference in New Issue
Block a user