verbings administration
This commit is contained in:
@@ -8,7 +8,7 @@ $module = $_GET['module'] ?? 'dashboard';
|
||||
$action = $_GET['action'] ?? 'list';
|
||||
|
||||
$validModules = ['dashboard', 'locations', 'buildings', 'rooms', 'device_types', 'devices', 'racks', 'floors', 'floor_infrastructure', 'connections', 'port_types'];
|
||||
$validActions = ['list', 'edit', 'save', 'ports', 'delete'];
|
||||
$validActions = ['list', 'edit', 'save', 'ports', 'delete', 'swap'];
|
||||
|
||||
if (!in_array($module, $validModules, true)) {
|
||||
renderClientError(400, 'Ungueltiges Modul');
|
||||
@@ -20,7 +20,7 @@ if (!in_array($action, $validActions, true)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!in_array($action, ['save', 'delete'], true)) {
|
||||
if (!in_array($action, ['save', 'delete', 'swap'], true)) {
|
||||
require_once __DIR__ . '/templates/header.php';
|
||||
}
|
||||
|
||||
@@ -32,6 +32,6 @@ if (file_exists($modulePath)) {
|
||||
renderClientError(404, 'Die angeforderte Seite existiert nicht.');
|
||||
}
|
||||
|
||||
if (!in_array($action, ['save', 'delete'], true)) {
|
||||
if (!in_array($action, ['save', 'delete', 'swap'], true)) {
|
||||
require_once __DIR__ . '/templates/footer.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user