From 40e614f56436447dffd272351e23b79c2da9fa3f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 9 Sep 2015 12:58:22 +0200 Subject: [ticket/13904] Fix tests after changes to factory PHPBB3-13904 --- phpBB/includes/functions_posting.php | 2 +- phpBB/phpbb/avatar/driver/upload.php | 4 ++-- phpBB/phpbb/files/upload.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 378d14d14d..cd7c9a82f7 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -433,7 +433,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage $upload->set_allowed_extensions(array_keys($extensions['_allowed_'])); /** @var \phpbb\files\filespec $file */ - $file = ($local) ? $upload->handle_upload('local', $local_storage, $local_filedata) : $upload->handle_upload('form', $form_name); + $file = ($local) ? $upload->handle_upload('files.types.local', $local_storage, $local_filedata) : $upload->handle_upload('files.types.form', $form_name); if ($file->init_error()) { diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index 2bd23a26a8..a0c23cb624 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -116,7 +116,7 @@ class upload extends \phpbb\avatar\driver\driver if (!empty($upload_file['name'])) { - $file = $upload->handle_upload('form', 'avatar_upload_file'); + $file = $upload->handle_upload('files.types.form', 'avatar_upload_file'); } else if (!empty($this->config['allow_avatar_remote_upload']) && !empty($url)) { @@ -146,7 +146,7 @@ class upload extends \phpbb\avatar\driver\driver return false; } - $file = $upload->handle_upload('remote', $url); + $file = $upload->handle_upload('files.types.remote', $url); } else { diff --git a/phpBB/phpbb/files/upload.php b/phpBB/phpbb/files/upload.php index 45ff1c372f..e011e714e5 100644 --- a/phpBB/phpbb/files/upload.php +++ b/phpBB/phpbb/files/upload.php @@ -197,7 +197,7 @@ class upload { $args = func_get_args(); array_shift($args); - $type_class = $this->factory->get('types.' . $type) + $type_class = $this->factory->get($type) ->set_upload($this); return (is_object($type_class)) ? call_user_func_array(array($type_class, 'upload'), $args) : false; -- cgit v1.2.1