aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-27 17:18:13 -0700
committerFriendika <info@friendika.com>2011-06-27 17:18:13 -0700
commit29c57f7ad27f91c78317ef9c44543d6b3f169302 (patch)
tree2a5f2e4aa1745dadca8f1cfd98d60623b0e6b5e4 /index.php
parent1947b74e5bd92f11a3e8af2223826e649233a883 (diff)
downloadvolse-hubzilla-29c57f7ad27f91c78317ef9c44543d6b3f169302.tar.gz
volse-hubzilla-29c57f7ad27f91c78317ef9c44543d6b3f169302.tar.bz2
volse-hubzilla-29c57f7ad27f91c78317ef9c44543d6b3f169302.zip
don't load configs if no database.
Diffstat (limited to 'index.php')
-rw-r--r--index.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/index.php b/index.php
index 9bca1527b..a58e4730f 100644
--- a/index.php
+++ b/index.php
@@ -44,18 +44,26 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
unset($db_host, $db_user, $db_pass, $db_data);
-/**
- * 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'];
+if(! $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);
+
+ require_once("session.php");
+ load_hooks();
+ call_hooks('init_1');
}
-unset($r);
/**
@@ -70,14 +78,6 @@ unset($r);
*
*/
-if(! $install) {
- require_once("session.php");
- load_hooks();
- call_hooks('init_1');
-}
-
-
-
require_once("datetime.php");
$a->timezone = (($default_timezone) ? $default_timezone : 'UTC');