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

[ticket/13904] Load upload class using factory

PHPBB3-13904
This commit is contained in:
Marc Alexander
2015-08-14 09:03:55 +02:00
parent d2be8e1503
commit 1af6f052d8
6 changed files with 47 additions and 32 deletions

View File

@@ -114,13 +114,8 @@ class remote extends \phpbb\avatar\driver\driver
return false;
}
if (!class_exists('fileupload'))
{
include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
}
$types = \fileupload::image_types();
$extension = strtolower(\filespec::get_extension($url));
$types = \phpbb\files\upload::image_types();
$extension = strtolower(\phpbb\files\filespec::get_extension($url));
// Check if this is actually an image
if ($file_stream = @fopen($url, 'r'))