From: Matthias Schmidt Date: Wed, 5 Jun 2013 14:13:15 +0000 (+0200) Subject: Hides smiley tab if user has no permission to use smileys X-Git-Tag: 2.0.0_Beta_4~127^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f8092bd88918120d35e13eaf0f3b94d4012f104;p=GitHub%2FWoltLab%2FWCF.git Hides smiley tab if user has no permission to use smileys --- diff --git a/com.woltlab.wcf/templates/messageFormSettings.tpl b/com.woltlab.wcf/templates/messageFormSettings.tpl index 5c4f52354e..4b1f4bfcd3 100644 --- a/com.woltlab.wcf/templates/messageFormSettings.tpl +++ b/com.woltlab.wcf/templates/messageFormSettings.tpl @@ -1,24 +1,24 @@
- {if $__wcf->getSession()->getPermission('user.message.canUseBBCodes')} + {if $__wcf->getSession()->getPermission($permissionCanUseBBCodes)}
{lang}wcf.message.settings.preParse.description{/lang}
{/if} - {if $__wcf->getSession()->getPermission('user.message.canUseSmilies')} + {if $__wcf->getSession()->getPermission($permissionCanUseSmilies)}
{lang}wcf.message.settings.enableSmilies.description{/lang}
{/if} - {if $__wcf->getSession()->getPermission('user.message.canUseBBCodes')} + {if $__wcf->getSession()->getPermission($permissionCanUseBBCodes)}
{lang}wcf.message.settings.enableBBCodes.description{/lang}
{/if} - {if $__wcf->getSession()->getPermission('user.message.canUseHtml')} + {if $__wcf->getSession()->getPermission($permissionCanUseHtml)}
{lang}wcf.message.settings.enableHtml.description{/lang} diff --git a/com.woltlab.wcf/templates/messageFormTabs.tpl b/com.woltlab.wcf/templates/messageFormTabs.tpl index e8660effae..b81e937a97 100644 --- a/com.woltlab.wcf/templates/messageFormTabs.tpl +++ b/com.woltlab.wcf/templates/messageFormTabs.tpl @@ -1,7 +1,7 @@
- {if MODULE_SMILEY && $smileyCategories|count}{include file='messageFormSmilies'}{/if} + {if MODULE_SMILEY && $__wcf->getSession()->getPermission($permissionCanUseSmilies) && $smileyCategories|count}{include file='messageFormSmilies'}{/if} {if MODULE_ATTACHMENT && $attachmentHandler !== null && $attachmentHandler->canUpload()}{include file='messageFormAttachments'}{/if} {include file='messageFormSettings'} diff --git a/wcfsetup/install/files/lib/form/MessageForm.class.php b/wcfsetup/install/files/lib/form/MessageForm.class.php index 0b3f0e20f4..ad4bf420ab 100644 --- a/wcfsetup/install/files/lib/form/MessageForm.class.php +++ b/wcfsetup/install/files/lib/form/MessageForm.class.php @@ -369,6 +369,9 @@ abstract class MessageForm extends RecaptchaForm { 'enableSmilies' => $this->enableSmilies, 'languageID' => ($this->languageID ?: 0), 'maxTextLength' => $this->maxTextLength, + 'permissionCanUseBBCodes' => $this->permissionCanUseBBCodes, + 'permissionCanUseHtml' => $this->permissionCanUseHtml, + 'permissionCanUseSmilies' => $this->permissionCanUseSmilies, 'preParse' => $this->preParse, 'showSignature' => $this->showSignature, 'showSignatureSetting' => $this->showSignatureSetting,