From e47fe8dcdd7eda9ecbf5ee5dd844f0f47831644c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 26 Apr 2023 12:07:28 +0200 Subject: [PATCH] Fix checks for form mode in LanguageAddForm --- wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php b/wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php index bf03b27e87..424044bb27 100644 --- a/wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php @@ -157,7 +157,7 @@ class LanguageAddForm extends AbstractFormBuilderForm ->label('wcf.acp.language.add.source') ->description('wcf.acp.language.add.source.description') ->options(LanguageFactory::getInstance()->getLanguages()) - ->available($this->formAction === IFormDocument::FORM_MODE_CREATE) + ->available($this->form->getFormMode() === IFormDocument::FORM_MODE_CREATE) ->required(), ]), ]); @@ -182,7 +182,7 @@ class LanguageAddForm extends AbstractFormBuilderForm $this->form->getDataHandler()->addProcessor(new CustomFormDataProcessor( 'sourceLanguage', function (IFormDocument $document, array $parameters) { - if ($this->formAction !== IFormDocument::FORM_MODE_CREATE) { + if ($document->getFormMode() !== IFormDocument::FORM_MODE_CREATE) { return $parameters; } -- 2.20.1