diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -29,7 +29,6 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false @include(".htconfig.php"); - $lang = get_language(); load_translation_table($lang); @@ -46,6 +45,20 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); /** + * Load configs from db. Overwrite configs from .htconfig.php + */ +$r = q("SELECT * FROM `config` WHERE `cat` IN ('system', 'config')"); +foreach ($r as $c) { + if ($c['cat']=='config') { + $a->config[$c['k']] = $c['v']; + } else { + $a->config[$c['cat']][$c['k']] = $c['v']; + } +} +unset($r); + + +/** * * Important stuff we always need to do. * Initialise authentication and date and time. |