summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-03-03 14:30:59 +0100
committerSimon Rettberg2021-03-03 14:30:59 +0100
commit6455db73f499b69e0243eecf872d716f507cbc26 (patch)
tree4d9816e0baa0c535347825fe2eee13c66f08f019 /modules-available/serversetup-bwlp-ipxe/page.inc.php
parent[rebootcontrol] Increase subnet delete timeout (diff)
downloadslx-admin-6455db73f499b69e0243eecf872d716f507cbc26.tar.gz
slx-admin-6455db73f499b69e0243eecf872d716f507cbc26.tar.xz
slx-admin-6455db73f499b69e0243eecf872d716f507cbc26.zip
[serversetup-bwlp-ipxe] Location-override: Show default, label for=""
Make label clickable by adding id/for pairs. Show menu default entry below menu name.
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, 3 insertions, 1 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php
index b5a70c25..e31814d1 100644
--- a/modules-available/serversetup-bwlp-ipxe/page.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php
@@ -915,7 +915,8 @@ class Page_ServerSetup extends Page
];
$menu = IPxeMenu::forLocation($loc['parentlocationid']);
$data['defaultMenu'] = $menu;
- $res = Database::simpleQuery('SELECT m.menuid, m.title, ml.locationid, ml.defaultentryid, GROUP_CONCAT(me.menuentryid) AS entries
+ $res = Database::simpleQuery('SELECT m.defaultentryid AS menu_default, m.menuid, m.title, ml.locationid,
+ ml.defaultentryid, GROUP_CONCAT(me.menuentryid) AS entries
FROM serversetup_menu m
LEFT JOIN serversetup_menu_location ml ON (m.menuid = ml.menuid AND ml.locationid = :locationid)
INNER JOIN serversetup_menuentry me ON (m.menuid = me.menuid AND me.entryid IS NOT NULL)
@@ -925,6 +926,7 @@ class Page_ServerSetup extends Page
$hasDefault = false;
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
$eids = explode(',', $row['entries']);
+ $row['default_entry_title'] = $menuEntries[$row['menu_default']] ?? '';
$row['entries'] = [];
foreach ($eids as $eid) {
$row['entries'][] = [