From: Marcel Werk Date: Sat, 23 Nov 2013 22:59:44 +0000 (+0100) Subject: Added missing permission check X-Git-Tag: 2.0.0_RC_3~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f734ff0d2c04b9cbc90e3e66a7f3e1b438008e9;p=GitHub%2FWoltLab%2FWCF.git Added missing permission check --- diff --git a/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php b/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php index 5ddaaa3a63..010a199ef1 100644 --- a/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php @@ -65,8 +65,14 @@ class BBCodeHandler extends SingletonFactory { * @return array<\wcf\data\bbcode\BBCode> */ public function getButtonBBCodes() { - // todo: check if BBCodes are available - return $this->buttonBBCodes; + $buttons = array(); + foreach ($this->buttonBBCodes as $bbcode) { + if ($this->isAvailableBBCode($bbcode->bbcodeTag)) { + $buttons[] = $bbcode; + } + } + + return $buttons; } /**