diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-06-13 12:51:36 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-06-13 12:51:36 +0200 |
commit | afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6 (patch) | |
tree | bafa32e53e1dfd332576727e23defa51e87d8984 /index.php | |
parent | d66056af9d56d86fdb57061c83c9187ea9f51403 (diff) | |
download | volse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.tar.gz volse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.tar.bz2 volse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.zip |
load $a->config from db
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. |