From 64dcf0c056aa9250f408a1151a3d52f9789506ee Mon Sep 17 00:00:00 2001 From: Jimmi08 Date: Thu, 31 Mar 2022 12:22:04 +0200 Subject: [PATCH] #4665 load bbcode buttons only if HTML is allowed for user CLOSES #4665 Tested scenarios: - site wysiwyg on, html access - result tinymce - site wysiwyg on, no html access - result bbcodes - site wysiwyg off, forum wysiwyg on, no html access - result bbcodes - site wysiwyg off, forum wysiwyg on, html access - result tinymce It worked like this before too, but bbcodes were always rendered (not visible with tinymce) --- e107_handlers/form_handler.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 9f5b75726..10e8b2c82 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2490,10 +2490,18 @@ class e_form } } } - } - - - $ret .= e107::getBB()->renderButtons($template,$help_tagid); + + if (!check_class(e107::getConfig()->get('post_html', e_UC_MAINADMIN))) + { + $ret .= e107::getBB()->renderButtons($template,$help_tagid); + } + + } + else + { + $ret .= e107::getBB()->renderButtons($template,$help_tagid); + } + $ret .= $this->textarea($name, $value, $rows, $cols, $options, $counter); // higher thank 70 will break some layouts. $ret .= "\n";