Upload via GUI (267 Dateien)
This commit is contained in:
@@ -316,6 +316,7 @@ function fetch_emails_for_account(PDO $pdo, array $account, bool $verbose): arra
|
||||
log_activity($pdo, $ticketId, null, 'Ticket-Regel angewendet: ' . implode(', ', $ruleResult['matched_rules']));
|
||||
}
|
||||
apply_auto_reply($pdo, $ticketId, $ruleResult['auto_reply']);
|
||||
$closedByRule = apply_rule_close($pdo, $ticketId, $ruleResult);
|
||||
|
||||
$deptStmt = $pdo->prepare('SELECT name, email FROM departments WHERE id = ?');
|
||||
$deptStmt->execute([$defaultDeptId]);
|
||||
@@ -328,9 +329,11 @@ function fetch_emails_for_account(PDO $pdo, array $account, bool $verbose): arra
|
||||
'department_id' => $defaultDeptId,
|
||||
'department_name' => $dept['name'] ?? null,
|
||||
];
|
||||
notify_new_ticket_channels($ticketForNotify, $dept['email'] ?? null);
|
||||
notify_staff_new_ticket($ticketForNotify);
|
||||
webhook_dispatch($pdo, 'ticket.created', $ticketId);
|
||||
if (!$closedByRule) {
|
||||
notify_new_ticket_channels($ticketForNotify, $dept['email'] ?? null);
|
||||
notify_staff_new_ticket($ticketForNotify);
|
||||
webhook_dispatch($pdo, 'ticket.created', $ticketId);
|
||||
}
|
||||
|
||||
handle_after_fetch($mbox, $emailNum, $afterFetch, $archiveFolder);
|
||||
$processed++;
|
||||
|
||||
@@ -72,7 +72,7 @@ function run_process_backups(PDO $pdo, bool $verbose = false, bool $force = fals
|
||||
|
||||
// Sofort prüfen, ob sich das Backup wiederherstellen lässt (ohne etwas zu verändern)
|
||||
require_once __DIR__ . '/../includes/backup_restore.php';
|
||||
$check = backup_verify_and_record($result['path']);
|
||||
$check = $result['verify'] ?? backup_verify_and_record($result['path']); // create_backup() prüft jedes Backup automatisch
|
||||
$log[] = date('Y-m-d H:i:s') . ($check['ok'] ? ' – Prüfung: Backup ist vollständig und wiederherstellbar.' : ' – WARNUNG, Backup nicht wiederherstellbar: ' . implode(' ', $check['errors']));
|
||||
|
||||
// Letztes Backup-Datum speichern
|
||||
@@ -140,6 +140,10 @@ function run_process_backups(PDO $pdo, bool $verbose = false, bool $force = fals
|
||||
}
|
||||
}
|
||||
|
||||
// Noch nicht oder lange nicht geprüfte Backups nachholen (zum Beispiel ältere oder von der NAS geholte)
|
||||
$late = backup_verify_pending(3);
|
||||
if ($late['checked']) $log[] = date('Y-m-d H:i:s') . ' – ' . $late['checked'] . ' weitere(s) Backup(s) geprüft' . ($late['bad'] ? ', davon ' . $late['bad'] . ' NICHT wiederherstellbar' : '') . '.';
|
||||
|
||||
set_setting('cron_process_backups_last_run', date('Y-m-d H:i:s'));
|
||||
$log[] = date('Y-m-d H:i:s') . ' – Fertig.';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user