From: Joshua Rüsweg Date: Thu, 21 Feb 2019 13:50:37 +0000 (+0100) Subject: Inject additional fields to FormBuilderForm::save() X-Git-Tag: 5.2.0_Alpha_1~284 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=27b54c77232de26ec94a29bab36ebe876996f45b;p=GitHub%2FWoltLab%2FWCF.git Inject additional fields to FormBuilderForm::save() --- 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();