mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 03:22:37 +02:00
[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
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user