From f4e03fab82fdab4506fe6b7d287c987e149729cb Mon Sep 17 00:00:00 2001 From: boban Date: Sat, 25 Oct 2025 14:56:01 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Mailbox=20Stats=20=C3=BCber=20Dovecot=20?= =?UTF-8?q?mit=20config/mailpool.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/CheckUpdates.php | 28 ++++++++++++--------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/app/Console/Commands/CheckUpdates.php b/app/Console/Commands/CheckUpdates.php index f5f2a9a..de07c78 100644 --- a/app/Console/Commands/CheckUpdates.php +++ b/app/Console/Commands/CheckUpdates.php @@ -14,46 +14,42 @@ class CheckUpdates extends Command $currentNorm = $this->readInstalledVersionNorm(); $currentRaw = $this->readInstalledVersionRaw() ?? ($currentNorm ? 'v'.$currentNorm : null); - // Neuesten Tag vom Remote holen (semver-freundlich sortiert) $appPath = base_path(); $cmd = <<normalizeVersion($latestTagRaw); - // Nichts gefunden -> Caches leeren + // Nichts gefunden -> alles leeren if (!$latestNorm) { cache()->forget('updates:latest'); cache()->forget('updates:latest_raw'); - cache()->forget('mailwolt.update_available'); // Legacy + cache()->forget('mailwolt.update_available'); // legacy $this->warn('Keine Release-Tags gefunden.'); return self::SUCCESS; } - // Cache schreiben - cache()->put('updates:latest', $latestNorm, now()->addMinutes(10)); - cache()->put('updates:latest_raw', $latestTagRaw, now()->addMinutes(10)); - cache()->forever('mailwolt.update_available', $latestNorm); // Legacy-Kompat - - // Vergleich & Ausgabe + // Nur wenn wirklich neuer als installiert -> Keys setzen if ($currentNorm && version_compare($latestNorm, $currentNorm, '>')) { + cache()->forever('updates:latest', $latestNorm); + cache()->forever('updates:latest_raw', $latestTagRaw ?: ('v'.$latestNorm)); + cache()->forever('mailwolt.update_available', $latestNorm); // legacy-kompat $this->info("Update verfügbar: {$latestTagRaw} (installiert: ".($currentRaw ?? $currentNorm).")"); } else { + // Kein Update -> Keys löschen + cache()->forget('updates:latest'); + cache()->forget('updates:latest_raw'); + cache()->forget('mailwolt.update_available'); // legacy $this->info("Aktuell (installiert: ".($currentRaw ?? $currentNorm ?? 'unbekannt').")."); - // Kein Update – Legacy-Key aufräumen (UI liest die neuen Keys) - cache()->forget('mailwolt.update_available'); } cache()->put('updates:last_checked_at', now(), now()->addMinutes(10));