aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-31 14:24:25 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-09-09 14:23:41 +0200
commitbc9a48804688e06a842169be0ed3efbf2fead559 (patch)
tree81241be20f6da44e83dae52221ddb7ae914fed0e /lib/private/Repair
parentf3ec1d3a9f6806aee32b27942e56931f79d9d02c (diff)
downloadnextcloud-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.php20
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();