]> git.mxchange.org Git - friendica.git/blob - include/cli_startup.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / include / cli_startup.php
1 <?php /** @file */
2
3 require_once('boot.php');
4
5 // Everything we need to boot standalone 'background' processes
6
7 function cli_startup() {
8
9         global $a, $db;
10
11         if(is_null($a)) {
12                 $a = new App;
13         }
14   
15         if(is_null($db)) {
16             @include(".htconfig.php");
17         require_once("dba.php");
18             $db = new dba($db_host, $db_user, $db_pass, $db_data);
19         unset($db_host, $db_user, $db_pass, $db_data);
20         };
21
22         require_once('include/session.php');
23
24         load_config('config');
25         load_config('system');
26
27         if ($hostname =  get_config('system', 'hostname'))
28                 $a->set_hostname($hostname);
29
30         $a->set_baseurl(get_config('system','url'));
31
32         load_hooks();
33
34 }