From a7a62eae259b5364236e191c4fe1adb62f261451 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 28 Jun 2013 17:21:18 +0200 Subject: [PATCH] Fixes issues with available BBCodes --- com.woltlab.wcf/templates/wysiwygToolbar.tpl | 2 +- .../files/lib/system/bbcode/BBCodeHandler.class.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/wysiwygToolbar.tpl b/com.woltlab.wcf/templates/wysiwygToolbar.tpl index 6c7583d7b4..b1be393d59 100644 --- a/com.woltlab.wcf/templates/wysiwygToolbar.tpl +++ b/com.woltlab.wcf/templates/wysiwygToolbar.tpl @@ -60,7 +60,7 @@ var $other = [ ]; {if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')} $other.push('Table'); {/if} -{if MODULE_SMILEY && $__wcf->getSession()->getPermission($permissionCanUseSmilies) && $smileyCategories|count} +{if MODULE_SMILEY && (!$permissionCanUseSmilies|isset || $__wcf->getSession()->getPermission($permissionCanUseSmilies)) && defaultSmilies|count} $other.push('Smiley'); {/if} diff --git a/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php b/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php index 21930d1f7f..af51d1fdf9 100644 --- a/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php @@ -14,6 +14,12 @@ use wcf\system\SingletonFactory; * @category Community Framework */ class BBCodeHandler extends SingletonFactory { + /** + * list of allowed BBCode tags in WYSIWYG editor + * @var array + */ + protected $allowedBBCodes = array(); + /** * list of BBCodes displayed as buttons * @var array @@ -59,6 +65,7 @@ class BBCodeHandler extends SingletonFactory { * @return array */ public function getButtonBBCodes() { + // todo: check if BBCodes are available return $this->buttonBBCodes; } -- 2.20.1