summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/install.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/install.inc.php')
-rw-r--r--modules-available/serversetup-bwlp-ipxe/install.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/install.inc.php b/modules-available/serversetup-bwlp-ipxe/install.inc.php
index 983988bb..5af00493 100644
--- a/modules-available/serversetup-bwlp-ipxe/install.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/install.inc.php
@@ -102,7 +102,7 @@ if (!tableHasColumn('serversetup_localboot', 'pcbios')) {
$result[] = tableAddConstraint('serversetup_menuentry', 'refmenuid', 'serversetup_menu', 'menuid',
'ON UPDATE CASCADE ON DELETE SET NULL');
-if (Module::get('location') !== false) {
+if (Module::get('locations') !== false) {
if (!tableExists('location')) {
$result[] = UPDATE_RETRY;
} else {
@@ -117,7 +117,7 @@ if (!tableHasColumn('serversetup_bootentry', 'module')) {
ADD COLUMN `module` varchar(30) CHARACTER SET ascii DEFAULT NULL AFTER `builtin`") !== false) {
$result[] = UPDATE_DONE;
$res = Database::simpleQuery('SELECT entryid, data FROM serversetup_bootentry WHERE module IS NULL');
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
$json = json_decode($row['data'], true);
if (isset($json['script'])) {
Database::exec("UPDATE serversetup_bootentry SET module = '.script' WHERE entryid = :id", ['id' => $row['entryid']]);