use wcf\data\comment\Comment;
use wcf\data\comment\CommentEditor;
use wcf\data\comment\CommentList;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\html\input\HtmlInputProcessor;
use wcf\system\WCF;
return;
}
+ // retrieve permissions
+ $userIDs = [];
+ foreach ($this->objectList as $comment) {
+ $userIDs[] = $comment->userID;
+ }
+ $userPermissions = $this->getBulkUserPermissions($userIDs, ['user.comment.disallowedBBCodes']);
+
WCF::getDB()->beginTransaction();
/** @var Comment $comment */
foreach ($this->objectList as $comment) {
$commentEditor->updateResponseIDs();
$commentEditor->updateUnfilteredResponseIDs();
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', $this->getBulkUserPermissionValue($userPermissions, $comment->userID, 'user.comment.disallowedBBCodes')));
+
// update message
if (!$comment->enableHtml) {
$this->getHtmlInputProcessor()->process($comment->message, 'com.woltlab.wcf.comment', $comment->commentID, true);
use wcf\data\comment\response\CommentResponse;
use wcf\data\comment\response\CommentResponseEditor;
use wcf\data\comment\response\CommentResponseList;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\html\input\HtmlInputProcessor;
use wcf\system\WCF;
return;
}
+ // retrieve permissions
+ $userIDs = [];
+ foreach ($this->objectList as $response) {
+ $userIDs[] = $response->userID;
+ }
+ $userPermissions = $this->getBulkUserPermissions($userIDs, ['user.comment.disallowedBBCodes']);
+
WCF::getDB()->beginTransaction();
/** @var CommentResponse $response */
foreach ($this->objectList as $response) {
$responseEditor = new CommentResponseEditor($response);
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', $this->getBulkUserPermissionValue($userPermissions, $response->userID, 'user.comment.disallowedBBCodes')));
+
// update message
if (!$response->enableHtml) {
$this->getHtmlInputProcessor()->process($response->message, 'com.woltlab.wcf.comment.response', $response->responseID, true);
use wcf\data\user\UserEditor;
use wcf\data\user\UserList;
use wcf\data\user\UserProfileAction;
+use wcf\system\bbcode\BBCodeHandler;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\SystemException;
use wcf\system\html\input\HtmlInputProcessor;
WHERE userID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
+ // retrieve permissions
+ $userIDs = [];
+ foreach ($users as $user) {
+ $userIDs[] = $user->userID;
+ }
+ $userPermissions = $this->getBulkUserPermissions($userIDs, ['user.message.disallowedBBCodes', 'user.signature.disallowedBBCodes']);
+
$htmlInputProcessor = new HtmlInputProcessor();
WCF::getDB()->beginTransaction();
/** @var UserEditor $user */
foreach ($users as $user) {
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', $this->getBulkUserPermissionValue($userPermissions, $user->userID, 'user.signature.disallowedBBCodes')));
+
if (!$user->signatureEnableHtml) {
$htmlInputProcessor->process($user->signature, 'com.woltlab.wcf.user.signature', $user->userID, true);
}
if ($user->aboutMe) {
+ BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', $this->getBulkUserPermissionValue($userPermissions, $user->userID, 'user.message.disallowedBBCodes')));
+
if (!$user->signatureEnableHtml) {
$htmlInputProcessor->process($user->aboutMe, 'com.woltlab.wcf.user.aboutMe', $user->userID, true);
}