maj+ header

This commit is contained in:
2018-08-22 14:46:33 +02:00
parent 28c9e9d76f
commit 3fc62ab1f1
443 changed files with 24198 additions and 6201 deletions
+8 -1
View File
@@ -402,7 +402,10 @@ class Form extends Iterator implements \Serializable
(array) $settings,
['name' => $post['name']]
);
// Allow plugins to adapt settings for a given post name
// Useful if schema retrieval is not an option, e.g. dynamically created forms
$grav->fireEvent('onFormUploadSettings', new Event(['settings' => &$settings, 'post' => $post]));
$upload = $this->normalizeFiles($_FILES['data'], $settings->name);
// Handle errors and breaks without proceeding further
@@ -699,6 +702,10 @@ class Form extends Iterator implements \Serializable
$queue = $session->getFlashObject('files-upload');
$queue = $queue[base64_encode($url)];
if (is_array($queue)) {
// Allow plugins to implement additional / alternative logic
// Add post to event data
$grav->fireEvent('onFormStoreUploads', new Event(['queue' => &$queue, 'form' => $this, 'post' => $post]));
foreach ($queue as $key => $files) {
foreach ($files as $destination => $file) {
if (!rename($file['tmp_name'], $destination)) {