Upload via GUI (340 Dateien)

This commit is contained in:
2026-10-26 21:19:10 +00:00
parent ecabba060c
commit a7aeec1b26
7 changed files with 160 additions and 6 deletions
+8 -2
View File
@@ -24,8 +24,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
->execute([$matchType, $value, $reason ?: null, $staff['id'], db_now()]);
// Tickets schließen
$col = $matchType === 'email' ? 'requester_email' : "" . sql_email_domain("requester_email") . "";
$pdo->prepare("UPDATE tickets SET status='closed',closed_at=?,updated_at=? WHERE $col=? AND status NOT IN ('closed')")
$priorStmt = $pdo->prepare("SELECT id,status FROM tickets WHERE $col=? AND status NOT IN ('closed')");
$priorStmt->execute([$value]); $priorTickets = $priorStmt->fetchAll();
$pdo->prepare("UPDATE tickets SET status='closed',resolution_code='spam',resolution_note='Im Rahmen einer Sperre geschlossen',closed_at=?,updated_at=? WHERE $col=? AND status NOT IN ('closed')")
->execute([db_now(), db_now(), $value]);
ticket_sla_transition_rows($pdo, $priorTickets, 'closed', (int) $staff['id']);
audit_log($staff['id'], "Sperrliste: $value hinzugefügt ($matchType)");
}
flash('success', "$value gesperrt.");
@@ -50,8 +53,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
->execute([$type, $val, $reason ?: null, $staff['id'], db_now()]);
// Tickets schließen
$col = $type === 'email' ? 'requester_email' : "" . sql_email_domain("requester_email") . "";
$pdo->prepare("UPDATE tickets SET status='closed',closed_at=?,updated_at=? WHERE $col=? AND status NOT IN ('closed')")
$priorStmt = $pdo->prepare("SELECT id,status FROM tickets WHERE $col=? AND status NOT IN ('closed')");
$priorStmt->execute([$val]); $priorTickets = $priorStmt->fetchAll();
$pdo->prepare("UPDATE tickets SET status='closed',resolution_code='spam',resolution_note='Im Rahmen einer Sperre geschlossen',closed_at=?,updated_at=? WHERE $col=? AND status NOT IN ('closed')")
->execute([db_now(), db_now(), $val]);
ticket_sla_transition_rows($pdo, $priorTickets, 'closed', (int) $staff['id']);
$added++;
}
audit_log($staff['id'], "Sperrliste Massen-Import: $added hinzugefügt, $skipped übersprungen");