Upload via GUI (267 Dateien)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user