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