diff options
author | Simon Rettberg | 2020-10-26 15:14:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-10-26 15:14:58 +0100 |
commit | 6d7606b2fd53a1d71f59eff5678daafe58d92a5b (patch) | |
tree | 93ff6f2afbc368de7266f2e07e8b08df982b4a24 /modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php | |
parent | [serversetup-bwlp-ipxe] stupidtable for bootentry list (diff) | |
download | slx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.tar.gz slx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.tar.xz slx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.zip |
[serversetup-bwlp-ipxe] Empty menu item title = use bootentry title
We now leave the input box for the menu item title empty, which shows
the matching bootentry's title as the placeholder. This will then also
be what's displayed in the actual menu. This way, updating the boot
entry's title will update the displayed menu item, if it wasn't
overridden previously.
Closes #3690
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php')
-rw-r--r-- | modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php index 1e567448..eb4a98de 100644 --- a/modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/inc/menuentry.inc.php @@ -41,8 +41,8 @@ class MenuEntry */ public static function get($menuEntryId) { - $row = Database::queryFirst("SELECT e.menuentryid, e.entryid, e.refmenuid, e.hotkey, e.title, e.hidden, e.sortval, e.plainpass, e.md5pass, - b.module, b.data AS bootentry + $row = Database::queryFirst("SELECT e.menuentryid, e.entryid, e.refmenuid, e.hotkey, e.title, + e.hidden, e.sortval, e.plainpass, e.md5pass, b.module, b.data AS bootentry, b.title AS betitle FROM serversetup_menuentry e LEFT JOIN serversetup_bootentry b USING (entryid) WHERE e.menuentryid = :id", ['id' => $menuEntryId]); @@ -59,6 +59,9 @@ class MenuEntry public function __construct($row) { if (is_array($row)) { + if (empty($row['title']) && !empty($row['betitle'])) { + $row['title'] = $row['betitle']; + } foreach ($row as $key => $value) { if (property_exists($this, $key)) { $this->{$key} = $value; |