summaryrefslogtreecommitdiffstats
path: root/apis/getconfig.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-01-03 19:02:44 +0100
committerSimon Rettberg2014-01-03 19:02:44 +0100
commitebd2641baa6320dbbe96930e29da963dd7445425 (patch)
tree4e995069fb3dcb338bc989c2af22f3502d061f41 /apis/getconfig.inc.php
parentRename PXE Menu entries (diff)
downloadslx-admin-ebd2641baa6320dbbe96930e29da963dd7445425.tar.gz
slx-admin-ebd2641baa6320dbbe96930e29da963dd7445425.tar.xz
slx-admin-ebd2641baa6320dbbe96930e29da963dd7445425.zip
Handle default config values better
Diffstat (limited to 'apis/getconfig.inc.php')
-rw-r--r--apis/getconfig.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apis/getconfig.inc.php b/apis/getconfig.inc.php
index 2ef02a6b..1e7a4f53 100644
--- a/apis/getconfig.inc.php
+++ b/apis/getconfig.inc.php
@@ -6,7 +6,7 @@ $res = Database::simpleQuery('SELECT setting.setting, setting.defaultvalue, sett
LEFT JOIN setting_global AS tbl USING (setting)
ORDER BY setting ASC'); // TODO: Add setting groups and sort order
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- if (empty($row['value'])) $row['value'] = $row['defaultvalue'];
+ if (is_null($row['value'])) $row['value'] = $row['defaultvalue'];
echo $row['setting'] . "='" . str_replace("'", "'\"'\"'", $row['value']) . "'\n";
}
// Additional "intelligent" config