Fixes issues with available BBCodes
authorMatthias Schmidt <gravatronics@live.com>
Fri, 28 Jun 2013 15:21:18 +0000 (17:21 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 28 Jun 2013 15:21:18 +0000 (17:21 +0200)
com.woltlab.wcf/templates/wysiwygToolbar.tpl
wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php

index 6c7583d7b4cebd01178a9d1be0451bc895cbea4a..b1be393d59b7365740efd22f621088ba6808f5ab 100644 (file)
@@ -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}
 
index 21930d1f7f234af45336ef44e6be8a398920c423..af51d1fdf9ad191a4ff2500a8b5c3bbe2984f502 100644 (file)
@@ -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<wcf\data\bbcode\BBCode>
@@ -59,6 +65,7 @@ class BBCodeHandler extends SingletonFactory {
         * @return      array<wcf\data\bbcode\BBCode>
         */
        public function getButtonBBCodes() {
+               // todo: check if BBCodes are available
                return $this->buttonBBCodes;
        }