0.4.1: detail page POST keeps the vm name (no more bounce to dashboard)
This commit is contained in:
1 parent
c577f3c96f
commit
bd5ae7e7bc
3 files changed
+9
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"appname": "VM Manager",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"rootfolder": "/mnt/Daten/extensions/vmmngr",
|
||||
"vm_source": "auto",
|
||||
"bridges": ["ix0bridge"],
|
||||
|
||||
+7
-1
@@ -6,6 +6,12 @@
|
||||
require_once 'vmmngr-boot.inc';
|
||||
|
||||
$name = (string)($_GET['name'] ?? '');
|
||||
// POSTs from this page carry the VM name in the act field; accept that too so
|
||||
// a form without the query string can never bounce to the dashboard
|
||||
if ($name === '' && isset($_POST['act'])) {
|
||||
$parts = explode(':', (string)$_POST['act'], 2);
|
||||
$name = $parts[1] ?? '';
|
||||
}
|
||||
if ($name === '' || !vmm_valid_name($name)) {
|
||||
header('Location: vmmngr.php');
|
||||
exit;
|
||||
@@ -77,7 +83,7 @@ vmm_css();
|
||||
vmm_nav('dashboard');
|
||||
?>
|
||||
|
||||
<form action="vmmngr_vm.php" method="post" name="iform" id="iform"><table id="area_data"><tbody><tr><td id="area_data_frame">
|
||||
<form action="vmmngr_vm.php?name=<?=urlencode($name);?>" method="post" name="iform" id="iform"><table id="area_data"><tbody><tr><td id="area_data_frame">
|
||||
|
||||
<?php if (isset($info['error'])): ?>
|
||||
<?php print_info_box(sprintf(gettext('Could not read VM details: %s'), vmm_h((string)$info['error']))); ?>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.4.0
|
||||
0.4.1
|
||||
Reference in new issue
Block a user