diff options
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/page.inc.php')
-rw-r--r-- | modules-available/serversetup-bwlp-ipxe/page.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php index 8fd6fd49..4e104e78 100644 --- a/modules-available/serversetup-bwlp-ipxe/page.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php @@ -294,7 +294,7 @@ class Page_ServerSetup extends Page ) m LEFT JOIN serversetup_localboot sl USING (systemmodel) ORDER BY systemmodel'); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { $row['modelesc'] = urlencode($row['systemmodel']); $row['options'] = $this->makeSelectArray(Localboot::BOOT_METHODS, $row); $models[] = $row; @@ -361,7 +361,7 @@ class Page_ServerSetup extends Page GROUP BY menuid, title ORDER BY title"); $menuTable = []; - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { if (empty($row['locations'])) { $locations = []; $row['allowEdit'] = in_array(0, $allowedEdit); @@ -433,7 +433,7 @@ class Page_ServerSetup extends Page LEFT JOIN serversetup_bootentry be USING (entryid) WHERE menuid = :id ORDER BY sortval ASC", compact('id')); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { if ($row['entryid'] === null && $row['refmenuid'] !== null) { $row['entryid'] = 'menu:' . $row['refmenuid']; } @@ -975,7 +975,7 @@ class Page_ServerSetup extends Page ORDER BY m.title ASC', ['locationid' => $locationId]); $menus = []; $hasDefault = false; - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { $eids = explode(',', $row['entries']); $row['default_entry_title'] = $menuEntries[$row['menu_default']] ?? ''; $row['entries'] = []; |