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