]> git.mxchange.org Git - friendica.git/blobdiff - include/cli_startup.php
Merge pull request #3366 from annando/issue-3358
[friendica.git] / include / cli_startup.php
index 236fd14427b3a4d608b14922fdf714e4755c457e..557d08c28874aaed1a0dff85d46883fb46a504f1 100644 (file)
@@ -1,5 +1,7 @@
 <?php /** @file */
 
+use \Friendica\Core\Config;
+
 require_once('boot.php');
 
 // Everything we need to boot standalone 'background' processes
@@ -8,24 +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);
-       };
 
-       require_once('include/session.php');
+       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);
+       };
 
-       load_config('config');
-       load_config('system');
+       require_once('include/session.php');
 
-       if ($hostname =  get_config('system', 'hostname'))
-               $a->set_hostname($hostname);
+       Config::load();
 
        $a->set_baseurl(get_config('system','url'));