aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/avatar/driver/upload.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-03-24 11:49:31 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-03-24 11:49:31 +0100
commit2a6e8f3668249bdf1c6120833fc7db4eaa73db73 (patch)
tree6250efd514ad4f210910ac9fba4fd8bdf8e9dd84 /phpBB/phpbb/avatar/driver/upload.php
parent200bcae2aecd5717a40ec1ad4ca8d598f94bc55b (diff)
parent1bb4e3621e7b5064445ce147b61da3799069a8b2 (diff)
downloadforums-2a6e8f3668249bdf1c6120833fc7db4eaa73db73.tar
forums-2a6e8f3668249bdf1c6120833fc7db4eaa73db73.tar.gz
forums-2a6e8f3668249bdf1c6120833fc7db4eaa73db73.tar.bz2
forums-2a6e8f3668249bdf1c6120833fc7db4eaa73db73.tar.xz
forums-2a6e8f3668249bdf1c6120833fc7db4eaa73db73.zip
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB/phpbb/avatar/driver/upload.php')
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index a0c23cb624..2640e1ad1e 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -179,17 +179,29 @@ class upload extends \phpbb\avatar\driver\driver
$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)
*
* @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 prefix Prefix for the avatar filename
* @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
* @since 3.1.6-RC1
+ * @changed 3.1.9-RC1 Added filedata
*/
$vars = array(
+ 'filedata',
'destination',
'prefix',
'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)));
+ unset($filedata);
+
if (!sizeof($error))
{
// Move file and overwrite any existing image