From: Alexander Ebert Date: Thu, 29 Sep 2016 18:00:13 +0000 (+0200) Subject: Fixed missing signature processing during user rebuild X-Git-Tag: 3.0.0_Beta_2~55 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b8c482084d9e14d781b4b3e9a0d316be4d948186;p=GitHub%2FWoltLab%2FWCF.git Fixed missing signature processing during user rebuild --- diff --git a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php index bd628ccad2..0ce57097c9 100644 --- a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php @@ -8,6 +8,7 @@ use wcf\data\user\UserEditor; use wcf\data\user\UserList; use wcf\data\user\UserProfileAction; use wcf\system\database\util\PreparedStatementConditionBuilder; +use wcf\system\html\input\HtmlInputProcessor; use wcf\system\image\ImageHandler; use wcf\system\user\activity\point\UserActivityPointHandler; use wcf\system\WCF; @@ -78,6 +79,22 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker { $statement->execute($conditionBuilder->getParameters()); } + // update signatures + $htmlInputProcessor = new HtmlInputProcessor(); + WCF::getDB()->beginTransaction(); + /** @var UserEditor $user */ + foreach ($users as $user) { + if (!$user->signatureEnableHtml) { + $htmlInputProcessor->process($user->signature, 'com.woltlab.wcf.user.signature', $user->userID, true); + + $user->update([ + 'signature' => $htmlInputProcessor->getHtml(), + 'signatureEnableHtml' => 1 + ]); + } + } + WCF::getDB()->commitTransaction(); + // update old avatars $avatarList = new UserAvatarList(); $avatarList->getConditionBuilder()->add('user_avatar.userID IN (?)', [$userIDs]);