Upload via GUI (267 Dateien)

This commit is contained in:
2026-10-19 18:05:53 +00:00
parent 42554bdadf
commit 1b29349219
7 changed files with 1570 additions and 1341 deletions
@@ -22,6 +22,16 @@ if ($departmentIds !== null) {
}
}
// Optional: nur Textbausteine für die Abteilung eines Tickets (diese Abteilung plus die für alle Abteilungen)
$onlyDept = isset($_GET['departmentId']) && ctype_digit((string) $_GET['departmentId']) ? (int) $_GET['departmentId'] : null;
if ($onlyDept !== null) {
if ($departmentIds !== null && !in_array($onlyDept, $departmentIds, true)) {
api_error(403, 'FORBIDDEN', 'Kein Zugriff auf diese Abteilung.');
}
$deptFilter = ' AND (cr.department_id IS NULL OR cr.department_id = ?)';
$deptParams = [$onlyDept];
}
$stmt = $pdo->prepare(
"SELECT cr.id, cr.title, cr.body, cr.department_id
FROM canned_responses cr