Upload via GUI (340 Dateien)

This commit is contained in:
2026-10-26 21:19:25 +00:00
parent 12699f0918
commit 2452849c74
7 changed files with 42 additions and 12 deletions
+5 -1
View File
@@ -31,8 +31,12 @@ $action = $body['action'] ?? '';
function api_close_banned_tickets(PDO $pdo, string $matchType, string $value): void
{
$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')")
$before = $pdo->prepare("SELECT id,status FROM tickets WHERE $col=? AND status NOT IN ('closed')");
$before->execute([$value]);
$rows = $before->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, $rows, 'closed', (int) ($GLOBALS['__api_staff']['id'] ?? 0) ?: null);
}
if ($action === 'create') {