From: Joshua Rüsweg Date: Mon, 28 Jan 2019 15:34:46 +0000 (+0100) Subject: Cleanup form in the `saved` method X-Git-Tag: 5.2.0_Alpha_1~341 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02a7ddc5095282d3258d6686ab5a3b88dc1a4968;p=GitHub%2FWoltLab%2FWCF.git Cleanup form in the `saved` method See #2509 --- diff --git a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php index 60f64e9b41..f0f0cd7533 100644 --- a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php +++ b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php @@ -154,14 +154,21 @@ abstract class AbstractFormBuilderForm extends AbstractForm { $this->saved(); + WCF::getTPL()->assign('success', true); + } + + /** + * @inheritDoc + */ + public function saved() { + parent::saved(); + // re-build form after having created a new object if ($this->formAction === 'create') { $this->form->cleanup(); $this->buildForm(); } - - WCF::getTPL()->assign('success', true); } /**