use wcf\data\IMessageInlineEditorAction;
use wcf\data\IMessageQuoteAction;
use wcf\system\attachment\AttachmentHandler;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\bbcode\BBCodeParser;
use wcf\system\bbcode\PreParser;
use wcf\system\exception\PermissionDeniedException;
* @see wcf\data\IMessageInlineEditorAction::beginEdit()
*/
public function beginEdit() {
+ BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes')));
+
WCF::getTPL()->assign(array(
'defaultSmilies' => SmileyCache::getInstance()->getCategorySmilies(),
'message' => $this->message,
+ 'permissionCanUseSmilies' => 'user.message.canUseSmilies',
'wysiwygSelector' => 'messageEditor'.$this->message->messageID
));
use wcf\data\conversation\ViewableConversation;
use wcf\data\modification\log\ConversationLogModificationLogList;
use wcf\data\smiley\SmileyCache;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\breadcrumb\Breadcrumb;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
'conversation' => $this->conversation,
'conversationID' => $this->conversationID,
'participants' => $this->participantList->getObjects(),
- 'defaultSmilies' => SmileyCache::getInstance()->getCategorySmilies()
+ 'defaultSmilies' => SmileyCache::getInstance()->getCategorySmilies(),
+ 'permissionCanUseSmilies' => 'user.message.canUseSmilies'
));
+
+ BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes')));
}
/**
$sql = "SELECT COUNT(*) AS messages
FROM wcf".WCF_N."_conversation_message conversation_message
".$conditionBuilder;
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute($conditionBuilder->getParameters());
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute($conditionBuilder->getParameters());
$row = $statement->fetchArray();
$this->pageNo = intval(ceil($row['messages'] / $this->itemsPerPage));
}
FROM wcf".WCF_N."_conversation_message conversation_message
".$conditionBuilder."
ORDER BY time ASC";
- $statement = WCF::getDB()->prepareStatement($sql, 1);
- $statement->execute($conditionBuilder->getParameters());
+ $statement = WCF::getDB()->prepareStatement($sql, 1);
+ $statement->execute($conditionBuilder->getParameters());
$row = $statement->fetchArray();
if ($row !== false) {
HeaderUtil::redirect(LinkHandler::getInstance()->getLink('Conversation', array(