From: Tim Düsterhus Date: Wed, 26 Apr 2023 10:07:28 +0000 (+0200) Subject: Fix checks for form mode in LanguageAddForm X-Git-Tag: 6.0.0_Alpha_1~203 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e47fe8dcdd7eda9ecbf5ee5dd844f0f47831644c;p=GitHub%2FWoltLab%2FWCF.git Fix checks for form mode in LanguageAddForm --- 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; }