From 8df7bc33f6e6257dc3da9a94648d621321920b18 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 15 Jun 2021 14:55:02 +0200 Subject: [PATCH] Make `WysiwygAttachmentFormField` only available if upload is allowed The same check exists in the non-form builder template `messageFormTabs.tpl`. --- .../field/wysiwyg/WysiwygAttachmentFormField.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/wysiwyg/WysiwygAttachmentFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/wysiwyg/WysiwygAttachmentFormField.class.php index 93d778edfe..ceb9b29b23 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/wysiwyg/WysiwygAttachmentFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/wysiwyg/WysiwygAttachmentFormField.class.php @@ -113,7 +113,9 @@ class WysiwygAttachmentFormField extends AbstractFormField { * @inheritDoc */ public function isAvailable() { - return parent::isAvailable() && $this->getAttachmentHandler() !== null; + return parent::isAvailable() + && $this->getAttachmentHandler() !== null + && $this->getAttachmentHandler()->canUpload(); } /** -- 2.20.1