From: Tim Düsterhus Date: Fri, 20 Aug 2021 07:30:32 +0000 (+0200) Subject: Update `coverPhotoHasWebP` in UserRebuilDataWorker X-Git-Tag: 5.4.5_RC_1~32^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=843f79ff40ff2a4957caf3d6356e9a8efc57c1c3;p=GitHub%2FWoltLab%2FWCF.git Update `coverPhotoHasWebP` in UserRebuilDataWorker --- diff --git a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php index 77f32e3fc7..ed61d9a67c 100644 --- a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php @@ -297,9 +297,13 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker $userProfiles->getConditionBuilder()->add("user_table.coverPhotoHash IS NOT NULL"); $userProfiles->readObjects(); foreach ($userProfiles as $userProfile) { + $editor = new UserEditor($userProfile->getDecoratedObject()); $coverPhoto = $userProfile->getCoverPhoto(true); if ($coverPhoto instanceof IWebpUserCoverPhoto) { $coverPhoto->createWebpVariant(); + $editor->update([ + 'coverPhotoHasWebP' => 1, + ]); } } }