summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-25 12:35:59 +0100
committerSimon Rettberg2019-03-25 12:35:59 +0100
commite97dcb72cb24f8c54c2b8f84b7e15b734a5a339d (patch)
tree96e9bbcd9b6fde609aa211d9f70a0250f98df228 /modules-available/serversetup-bwlp-ipxe/page.inc.php
parent[sysconfig] Add missing field to query (diff)
downloadslx-admin-e97dcb72cb24f8c54c2b8f84b7e15b734a5a339d.tar.gz
slx-admin-e97dcb72cb24f8c54c2b8f84b7e15b734a5a339d.tar.xz
slx-admin-e97dcb72cb24f8c54c2b8f84b7e15b734a5a339d.zip
[serversetup-bwlp-ipxe] Redirect to serveraddr page if invalid
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/page.inc.php')
-rw-r--r--modules-available/serversetup-bwlp-ipxe/page.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php
index bcb241b5..6bf166ea 100644
--- a/modules-available/serversetup-bwlp-ipxe/page.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php
@@ -108,12 +108,14 @@ class Page_ServerSetup extends Page
User::assertPermission('access-page');
+ $addr = false;
if (User::hasPermission('ipxe.*')) {
Dashboard::addSubmenu('?do=serversetup&show=menu', Dictionary::translate('submenu_menu', true));
Dashboard::addSubmenu('?do=serversetup&show=bootentry', Dictionary::translate('submenu_bootentry', true));
}
if (User::hasPermission('edit.address')) {
Dashboard::addSubmenu('?do=serversetup&show=address', Dictionary::translate('submenu_address', true));
+ $addr = true;
}
if (User::hasPermission('download')) {
Dashboard::addSubmenu('?do=serversetup&show=download', Dictionary::translate('submenu_download', true));
@@ -128,6 +130,8 @@ class Page_ServerSetup extends Page
$subs = Dashboard::getSubmenus();
if (empty($subs)) {
User::assertPermission('download');
+ } elseif (Property::getServerIp() === 'invalid' && $addr) {
+ Util::redirect('?do=serversetup&show=address');
} else {
Util::redirect($subs[0]['url']);
}