Upload via GUI (452 Dateien)

This commit is contained in:
2026-11-05 21:21:48 +00:00
parent e90c1a4563
commit 10578475f0
14 changed files with 543 additions and 18 deletions
+8 -1
View File
@@ -76,7 +76,14 @@ function ticket_snooze_wake_due(PDO $pdo): int
} catch (Throwable $e) {
return 0; // Spalte fehlt (Datenbank noch nicht aktualisiert)
}
$woken = 0;
foreach ($due as $t) {
// Erledigte Tickets (gelöst oder geschlossen) brauchen keine Wiedervorlage mehr: still aufräumen, keine Benachrichtigung
if (in_array((string) $t['status'], ['resolved', 'closed'], true)) {
$pdo->prepare('UPDATE tickets SET snoozed_until = NULL, snoozed_by = NULL WHERE id = ?')->execute([$t['id']]);
continue;
}
$woken++;
$pdo->prepare('UPDATE tickets SET snoozed_until = NULL, snoozed_by = NULL, updated_at = ? WHERE id = ?')->execute([db_now(), $t['id']]);
log_activity($pdo, (int) $t['id'], null, 'Wiedervorlage fällig');
$to = (int) ($t['snoozed_by'] ?: ($t['assigned_staff_id'] ?? 0));
@@ -88,7 +95,7 @@ function ticket_snooze_wake_due(PDO $pdo): int
}
}
}
return count($due);
return $woken;
}
// ── Beobachter ───────────────────────────────────────────────────────────────