mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +02:00
Merge pull request #3913 from marc1706/ticket/14168
[ticket/14168] Refactor attachment management functions into classes * marc1706/ticket/14168: (36 commits) [ticket/14168] Correctly state return type of upload and upload_attachment [ticket/14168] Use attachment manager instead of separate classes [ticket/14168] Fix docblock in manager [ticket/14168] Add more test cases for attachment manager [ticket/14168] Add new test method and more tests [ticket/14168] Fix tabs in manager and add test file [ticket/14168] Fix tests after rebase [ticket/14168] Add attachment manager service [ticket/14168] Use correct docblock [ticket/14168] Add services_attachment.yml to services.yml [ticket/14168] Minor coding style fixes [ticket/14168] Move attachment service definitions to services_attachment [ticket/14168] Improve code coverage in upload class [ticket/14168] Move image check and don't use trigger_error() [ticket/14168] Add tests for init_error() during upload [ticket/14168] Add basic test file for attachments upload [ticket/14168] Fix CS issue [ticket/14168] No longer use deprecated functions in core files [ticket/14168] Move phpbb_unlink() into attachment delete class [ticket/14168] Reset sequence before tests in delete tests ...
This commit is contained in:
@@ -70,12 +70,10 @@ class ucp_attachments
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!function_exists('delete_attachments'))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
delete_attachments('attach', $delete_ids);
|
||||
/** @var \phpbb\attachment\manager $attachment_manager */
|
||||
$attachment_manager = $phpbb_container->get('attachment.manager');
|
||||
$attachment_manager->delete('attach', $delete_ids);
|
||||
unset($attachment_manager);
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
$message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
||||
|
Reference in New Issue
Block a user