mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:40:17 +00:00
don't load configs if no database.
This commit is contained in:
parent
1947b74e5b
commit
29c57f7ad2
1 changed files with 18 additions and 18 deletions
36
index.php
36
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);
|
unset($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
|
||||||
|
|
||||||
/**
|
if(! $install) {
|
||||||
* Load configs from db. Overwrite configs from .htconfig.php
|
|
||||||
*/
|
/**
|
||||||
$r = q("SELECT * FROM `config` WHERE `cat` IN ('system', 'config')");
|
* Load configs from db. Overwrite configs from .htconfig.php
|
||||||
foreach ($r as $c) {
|
*/
|
||||||
if ($c['cat']=='config') {
|
|
||||||
$a->config[$c['k']] = $c['v'];
|
$r = q("SELECT * FROM `config` WHERE `cat` IN ('system', 'config')");
|
||||||
} else {
|
foreach ($r as $c) {
|
||||||
$a->config[$c['cat']][$c['k']] = $c['v'];
|
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");
|
require_once("datetime.php");
|
||||||
|
|
||||||
$a->timezone = (($default_timezone) ? $default_timezone : 'UTC');
|
$a->timezone = (($default_timezone) ? $default_timezone : 'UTC');
|
||||||
|
|
Loading…
Reference in a new issue