diff options
author | Simon Rettberg | 2019-12-07 15:28:30 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-12-07 15:28:30 +0100 |
commit | 7d6275514cd4e0ab2903f8c0891c85f3b0e66539 (patch) | |
tree | e5bb9520cc6e715dbfa8e24650e97167ea8126d1 /modules-available/rebootcontrol/pages/subnet.inc.php | |
parent | Merge branch 'master' into wol (diff) | |
download | slx-admin-7d6275514cd4e0ab2903f8c0891c85f3b0e66539.tar.gz slx-admin-7d6275514cd4e0ab2903f8c0891c85f3b0e66539.tar.xz slx-admin-7d6275514cd4e0ab2903f8c0891c85f3b0e66539.zip |
[rebootcontrol] Implement assigning subnets to jump host
Also fix removing all jump hosts from a subnet.
Update translations.
Diffstat (limited to 'modules-available/rebootcontrol/pages/subnet.inc.php')
-rw-r--r-- | modules-available/rebootcontrol/pages/subnet.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/rebootcontrol/pages/subnet.inc.php b/modules-available/rebootcontrol/pages/subnet.inc.php index c38c7595..45151954 100644 --- a/modules-available/rebootcontrol/pages/subnet.inc.php +++ b/modules-available/rebootcontrol/pages/subnet.inc.php @@ -58,7 +58,9 @@ class SubPage WHERE subnetid = :id', $params); if (User::hasPermission('jumphost.assign-subnet')) { $hosts = Request::post('jumphost', [], 'array'); - if (!empty($hosts)) { + if (empty($hosts)) { + Database::exec('DELETE FROM reboot_jumphost_x_subnet WHERE subnetid = :id AND', ['id' => $id]); + } else { $hosts = array_keys($hosts); Database::exec('DELETE FROM reboot_jumphost_x_subnet WHERE subnetid = :id AND hostid NOT IN (:hosts)', ['id' => $id, 'hosts' => $hosts]); |