Upload via GUI (452 Dateien)

This commit is contained in:
2026-11-05 21:21:27 +00:00
parent cdec2d346b
commit 7c664f0a6b
7 changed files with 9 additions and 11 deletions
@@ -38,7 +38,7 @@ if ($action === 'save') {
$cfg = report_clean_config($pdo, (array) ($body['config'] ?? []));
$now = db_now();
$pdo->prepare('INSERT INTO saved_reports (staff_id, name, config, is_shared, created_at, updated_at) VALUES (?,?,?,?,?,?)')
->execute([$staff['id'], mb_substr($name, 0, 120), json_encode($cfg, JSON_UNESCAPED_UNICODE), !empty($body['isShared']) ? 1 : 0, $now, $now]);
->execute([$staff['id'], mb_substr($name, 0, 120), json_encode($cfg, JSON_UNESCAPED_UNICODE), (!empty($body['isShared']) && has_permission($staff, 'share_views')) ? 1 : 0, $now, $now]);
api_json(['id' => (int) $pdo->lastInsertId()]);
}
if ($action === 'delete') {