]> git.mxchange.org Git - friendica.git/commitdiff
don't load configs if no database.
authorFriendika <info@friendika.com>
Tue, 28 Jun 2011 00:18:13 +0000 (17:18 -0700)
committerFriendika <info@friendika.com>
Tue, 28 Jun 2011 00:18:13 +0000 (17:18 -0700)
index.php

index 9bca1527bfc99f1926d89fdc1280475e0ad2b465..a58e4730fa42fe77744b18c548af26f7b5f141a3 100644 (file)
--- 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');