From 2350652120d56b94a6650c26f1bf042780ba3f04 Mon Sep 17 00:00:00 2001 From: Olaf Braun Date: Mon, 25 Mar 2024 16:05:55 +0100 Subject: [PATCH] Set attachment support depending on whether `attachmentField` available (#5856) --- .../builder/container/wysiwyg/WysiwygFormContainer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( -- 2.20.1