From: Olaf Braun Date: Mon, 25 Mar 2024 15:05:55 +0000 (+0100) Subject: Set attachment support depending on whether `attachmentField` available (#5856) X-Git-Tag: 6.0.11_dev_1~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2350652120d56b94a6650c26f1bf042780ba3f04;p=GitHub%2FWoltLab%2FWCF.git Set attachment support depending on whether `attachmentField` available (#5856) --- diff --git a/wcfsetup/install/files/lib/system/form/builder/container/wysiwyg/WysiwygFormContainer.class.php b/wcfsetup/install/files/lib/system/form/builder/container/wysiwyg/WysiwygFormContainer.class.php index aded5e5cad..7229153497 100644 --- a/wcfsetup/install/files/lib/system/form/builder/container/wysiwyg/WysiwygFormContainer.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/container/wysiwyg/WysiwygFormContainer.class.php @@ -475,7 +475,6 @@ class WysiwygFormContainer extends FormContainer ->minimumLength($this->getMinimumLength()) ->maximumLength($this->getMaximumLength()) ->required($this->isRequired()) - ->supportAttachments($this->attachmentData !== null) ->supportMentions($this->supportMentions) ->supportQuotes($this->supportQuotes); if ($this->quoteData !== null) { @@ -529,6 +528,7 @@ class WysiwygFormContainer extends FormContainer if ($this->attachmentData !== null) { $this->setAttachmentHandler(); } + $this->wysiwygField->supportAttachments($this->attachmentField->isAvailable()); if ($this->enablePreviewButton) { $this->getDocument()->addButton(