From: Alexander Ebert Date: Sun, 8 Jan 2017 11:38:01 +0000 (+0100) Subject: Fixed missing `aboutMe` rebuilding X-Git-Tag: 3.0.0~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a413435036eeee3a7d68f5a493a9b8a22409b3f;p=GitHub%2FWoltLab%2FWCF.git Fixed missing `aboutMe` rebuilding --- diff --git a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php index c0bafe93cc..4e18b78f17 100644 --- a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php @@ -4,6 +4,7 @@ use wcf\data\like\Like; use wcf\data\user\avatar\UserAvatar; use wcf\data\user\avatar\UserAvatarEditor; use wcf\data\user\avatar\UserAvatarList; +use wcf\data\user\User; use wcf\data\user\UserEditor; use wcf\data\user\UserList; use wcf\data\user\UserProfileAction; @@ -40,6 +41,8 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker { protected function initObjectList() { parent::initObjectList(); + $this->objectList->sqlSelects = 'user_option_value.userOption' . User::getUserOptionID('aboutMe') . ' AS aboutMe'; + $this->objectList->sqlJoins = "LEFT JOIN wcf".WCF_N."_user_option_value user_option_value ON (user_option_value.userID = user_table.userID)"; $this->objectList->sqlOrderBy = 'user_table.userID'; } @@ -81,7 +84,12 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker { $statement->execute($conditionBuilder->getParameters()); } - // update signatures + // update signatures and about me + $sql = "UPDATE wcf".WCF_N."_user_option_value + SET userOption" . User::getUserOptionID('aboutMe') . " = ? + WHERE userID = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $htmlInputProcessor = new HtmlInputProcessor(); WCF::getDB()->beginTransaction(); /** @var UserEditor $user */ @@ -93,6 +101,14 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker { 'signature' => $htmlInputProcessor->getHtml(), 'signatureEnableHtml' => 1 ]); + + if ($user->aboutMe) { + $htmlInputProcessor->process($user->aboutMe, 'com.woltlab.wcf.user.aboutMe', $user->userID, true); + $statement->execute([ + $htmlInputProcessor->getHtml(), + $user->userID + ]); + } } } WCF::getDB()->commitTransaction();