summaryrefslogtreecommitdiffstats
path: root/modules/serversetup.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-05-28 18:18:34 +0200
committerSimon Rettberg2014-05-28 18:18:34 +0200
commite4e79982dd3c447a4ced762a6069db553e246f59 (patch)
treed17f74565ed5347350edeab412a07c77bd80a636 /modules/serversetup.inc.php
parentWIP (diff)
downloadslx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.tar.gz
slx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.tar.xz
slx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.zip
Fixed some bugs from Sateserver v05
Diffstat (limited to 'modules/serversetup.inc.php')
-rw-r--r--modules/serversetup.inc.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/modules/serversetup.inc.php b/modules/serversetup.inc.php
index 3e98b4ad..73a1a8fc 100644
--- a/modules/serversetup.inc.php
+++ b/modules/serversetup.inc.php
@@ -15,7 +15,7 @@ class Page_ServerSetup extends Page
Message::addError('no-permission');
Util::redirect('?do=Main');
}
-
+
$this->currentMenu = Property::getBootMenu();
$action = Request::post('action');
@@ -30,7 +30,7 @@ class Page_ServerSetup extends Page
$this->getLocalAddresses();
$this->updateLocalAddress();
}
-
+
if ($action === 'ipxe') {
// iPXE stuff changes
$this->updatePxeMenu();
@@ -40,7 +40,7 @@ class Page_ServerSetup extends Page
protected function doRender()
{
Render::setTitle('Serverseitige Konfiguration');
-
+
Render::addTemplate('serversetup/ipaddress', array(
'ips' => $this->taskStatus['data']['addresses'],
'token' => Session::get('token')
@@ -48,12 +48,15 @@ class Page_ServerSetup extends Page
$data = $this->currentMenu;
$data['token'] = Session::get('token');
$data['taskid'] = Property::getIPxeTaskId();
- if ($data['defaultentry'] === 'net') $data['active-net'] = 'checked';
- if ($data['defaultentry'] === 'hdd') $data['active-hdd'] = 'checked';
- if ($data['defaultentry'] === 'custom') $data['active-custom'] = 'checked';
+ if ($data['defaultentry'] === 'net')
+ $data['active-net'] = 'checked';
+ if ($data['defaultentry'] === 'hdd')
+ $data['active-hdd'] = 'checked';
+ if ($data['defaultentry'] === 'custom')
+ $data['active-custom'] = 'checked';
Render::addTemplate('serversetup/ipxe', $data);
}
-
+
// -----------------------------------------------------------------------------------------------
private function getLocalAddresses()
@@ -104,10 +107,12 @@ class Page_ServerSetup extends Page
}
Util::redirect();
}
-
+
private function updatePxeMenu()
{
$timeout = Request::post('timeout', 10);
+ if ($timeout === '')
+ $timeout = 10;
if (!is_numeric($timeout)) {
Message::addError('value-invalid', 'timeout', $timeout);
}