From c3d77edd836a0fd026f7ea644b87ab39cb24986e Mon Sep 17 00:00:00 2001 From: javiexin Date: Fri, 24 Jul 2015 10:52:00 +0200 Subject: [PATCH] [ticket/13981] Add events to capture avatar deletion or overwriting An event to capture new avatar moving in place (and maybe overwriting existing avatar), and another to capture deletion. Includes better error processing. Rename event. PHPBB3-13981 --- phpBB/phpbb/avatar/driver/upload.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index 2393b4ed94..f6a5324f0d 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -168,9 +168,9 @@ class upload extends \phpbb\avatar\driver\driver } /** - * Before overwriting an existing avatar with a newly uploaded avatar + * Before moving new file in place (and eventually overwriting the existing avatar with the newly uploaded avatar) * - * @event core.avatar_driver_upload_overwrite_before + * @event core.avatar_driver_upload_move_file_before * @var string destination Destination directory where the file is going to be moved * @var string prefix Prefix for the avatar filename * @var array row Array with avatar row data @@ -183,7 +183,7 @@ class upload extends \phpbb\avatar\driver\driver 'row', 'error', ); - extract($this->dispatcher->trigger_event('core.avatar_driver_upload_overwrite_before', compact($vars))); + extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars))); if (!sizeof($error)) {