refactor: move Restrictions d'accès aux fichiers from contenus.php to acces.php, cleanup section

This commit is contained in:
Pontoporeia
2026-05-11 11:40:50 +02:00
parent d000f9e1d4
commit 1b0451581d
7 changed files with 152 additions and 67 deletions

View File

@@ -162,8 +162,10 @@ $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
// Redirect back to wherever the form came from, defaulting to parametres
$redirect = '/admin/parametres.php';
if (in_array($section, ['formulaire_restrictions', 'formulaire_acces', 'objet_types'], true)) {
if (in_array($section, ['formulaire_acces', 'objet_types'], true)) {
$redirect = '/admin/contenus.php';
} elseif ($section === 'formulaire_restrictions') {
$redirect = '/admin/acces.php';
}
header('Location: ' . $redirect);
exit;