aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-03-24 11:49:24 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-03-24 11:49:24 +0100
commit1bb4e3621e7b5064445ce147b61da3799069a8b2 (patch)
tree657128e3a0bb590d7c41efcb42c3221ea4f3f2d2 /phpBB/phpbb
parentc36892f2fa4bc68643b57a09d3c546c16ce5eb8d (diff)
parent795ce6ccf1087c1d7c61c568cd83862302be8fe0 (diff)
downloadforums-1bb4e3621e7b5064445ce147b61da3799069a8b2.tar
forums-1bb4e3621e7b5064445ce147b61da3799069a8b2.tar.gz
forums-1bb4e3621e7b5064445ce147b61da3799069a8b2.tar.bz2
forums-1bb4e3621e7b5064445ce147b61da3799069a8b2.tar.xz
forums-1bb4e3621e7b5064445ce147b61da3799069a8b2.zip
Merge pull request #4175 from Senky/ticket/14471
[ticket/14471] Add $filedata to core.avatar_driver_upload_move_file_before event
Diffstat (limited to 'phpBB/phpbb')
-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 e44157294c..cb8dfcad4f 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -167,17 +167,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',
@@ -185,6 +197,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