mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
1aedf3ab60
1 changed files with 14 additions and 0 deletions
|
@ -179,17 +179,29 @@ class upload extends \phpbb\avatar\driver\driver
|
||||||
$destination = '';
|
$destination = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filedata = array(
|
||||||
|
'filename' => $file->get('filename'),
|
||||||
|
'filesize' => $file->get('filesize'),
|
||||||
|
'mimetype' => $file->get('mimetype'),
|
||||||
|
'extension' => $file->get('extension'),
|
||||||
|
'physical_filename' => $file->get('realname'),
|
||||||
|
'real_filename' => $file->get('uploadname'),
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Before moving new file in place (and eventually overwriting the existing avatar with the 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_move_file_before
|
* @event core.avatar_driver_upload_move_file_before
|
||||||
|
* @var array filedata Array containing uploaded file data
|
||||||
* @var string destination Destination directory where the file is going to be moved
|
* @var string destination Destination directory where the file is going to be moved
|
||||||
* @var string prefix Prefix for the avatar filename
|
* @var string prefix Prefix for the avatar filename
|
||||||
* @var array row Array with avatar row data
|
* @var array row Array with avatar row data
|
||||||
* @var array error Array of errors, if filled in by this event file will not be moved
|
* @var array error Array of errors, if filled in by this event file will not be moved
|
||||||
* @since 3.1.6-RC1
|
* @since 3.1.6-RC1
|
||||||
|
* @changed 3.1.9-RC1 Added filedata
|
||||||
*/
|
*/
|
||||||
$vars = array(
|
$vars = array(
|
||||||
|
'filedata',
|
||||||
'destination',
|
'destination',
|
||||||
'prefix',
|
'prefix',
|
||||||
'row',
|
'row',
|
||||||
|
@ -197,6 +209,8 @@ class upload extends \phpbb\avatar\driver\driver
|
||||||
);
|
);
|
||||||
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars)));
|
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars)));
|
||||||
|
|
||||||
|
unset($filedata);
|
||||||
|
|
||||||
if (!sizeof($error))
|
if (!sizeof($error))
|
||||||
{
|
{
|
||||||
// Move file and overwrite any existing image
|
// Move file and overwrite any existing image
|
||||||
|
|
Loading…
Add table
Reference in a new issue