mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
The config class now makes less database reads.
This commit is contained in:
parent
045e94ccf3
commit
0548099f6c
29 changed files with 153 additions and 107 deletions
|
@ -1,5 +1,7 @@
|
|||
<?php /** @file */
|
||||
|
||||
use \Friendica\Core\Config;
|
||||
|
||||
require_once('boot.php');
|
||||
|
||||
// Everything we need to boot standalone 'background' processes
|
||||
|
@ -8,21 +10,20 @@ function cli_startup() {
|
|||
|
||||
global $a, $db;
|
||||
|
||||
if(is_null($a)) {
|
||||
if (is_null($a)) {
|
||||
$a = new App;
|
||||
}
|
||||
|
||||
if(is_null($db)) {
|
||||
@include(".htconfig.php");
|
||||
require_once("dba.php");
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
if (is_null($db)) {
|
||||
@include(".htconfig.php");
|
||||
require_once("dba.php");
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
};
|
||||
|
||||
require_once('include/session.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
Config::load();
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue