diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-31 14:24:25 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-09-09 14:23:41 +0200 |
commit | bc9a48804688e06a842169be0ed3efbf2fead559 (patch) | |
tree | 81241be20f6da44e83dae52221ddb7ae914fed0e /lib/private/Repair | |
parent | f3ec1d3a9f6806aee32b27942e56931f79d9d02c (diff) | |
download | nextcloud-server-bc9a48804688e06a842169be0ed3efbf2fead559.tar.gz nextcloud-server-bc9a48804688e06a842169be0ed3efbf2fead559.zip |
Update avatars on update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/ClearGeneratedAvatarCache.php | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/private/Repair/ClearGeneratedAvatarCache.php b/lib/private/Repair/ClearGeneratedAvatarCache.php index 314299a0528..1c1be4f7893 100644 --- a/lib/private/Repair/ClearGeneratedAvatarCache.php +++ b/lib/private/Repair/ClearGeneratedAvatarCache.php @@ -30,35 +30,29 @@ use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; class ClearGeneratedAvatarCache implements IRepairStep { - - /** @var AvatarManager */ - protected $avatarManager; - - /** @var IConfig */ - private $config; + protected AvatarManager $avatarManager; + private IConfig $config; public function __construct(IConfig $config, AvatarManager $avatarManager) { $this->config = $config; $this->avatarManager = $avatarManager; } - public function getName() { + public function getName(): string { return 'Clear every generated avatar on major updates'; } /** * Check if this repair step should run - * - * @return boolean */ - private function shouldRun() { + private function shouldRun(): bool { $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); - // was added to 15.0.0.4 - return version_compare($versionFromBeforeUpdate, '15.0.0.4', '<='); + // was added to 25.0.0.10 + return version_compare($versionFromBeforeUpdate, '25.0.0.10', '<='); } - public function run(IOutput $output) { + public function run(IOutput $output): void { if ($this->shouldRun()) { try { $this->avatarManager->clearCachedAvatars(); |