From: Matthias Schmidt Date: Tue, 15 Jun 2021 12:55:02 +0000 (+0200) Subject: Make `WysiwygAttachmentFormField` only available if upload is allowed X-Git-Tag: 5.4.0_Beta_2~4^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8df7bc33f6e6257dc3da9a94648d621321920b18;p=GitHub%2FWoltLab%2FWCF.git Make `WysiwygAttachmentFormField` only available if upload is allowed The same check exists in the non-form builder template `messageFormTabs.tpl`. --- 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(); } /**