aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-06-13 12:51:36 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-06-13 12:51:36 +0200
commitafd0f8e4d8ff0a37d1a337f160eeae642a2f07d6 (patch)
treebafa32e53e1dfd332576727e23defa51e87d8984
parentd66056af9d56d86fdb57061c83c9187ea9f51403 (diff)
downloadvolse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.tar.gz
volse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.tar.bz2
volse-hubzilla-afd0f8e4d8ff0a37d1a337f160eeae642a2f07d6.zip
load $a->config from db
-rw-r--r--index.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/index.php b/index.php
index 534cb93f7..9bca1527b 100644
--- a/index.php
+++ b/index.php
@@ -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.