From 27b54c77232de26ec94a29bab36ebe876996f45b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Thu, 21 Feb 2019 14:50:37 +0100 Subject: [PATCH] Inject additional fields to FormBuilderForm::save() --- .../files/lib/form/AbstractFormBuilderForm.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php index f68e7a201e..f088c81418 100644 --- a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php +++ b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php @@ -146,11 +146,15 @@ abstract class AbstractFormBuilderForm extends AbstractForm { $action = 'update'; } + $formData = $this->form->getData(); + if (!isset($formData['data'])) $formData['data'] = []; + $formData['data'] = array_merge($this->additionalFields, $formData['data']); + /** @var AbstractDatabaseObjectAction objectAction */ $this->objectAction = new $this->objectActionClass( array_filter([$this->formObject]), $action, - $this->form->getData() + $formData ); $this->objectAction->executeAction(); -- 2.20.1