mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:50:11 +00:00
"dba" is now a static class
This commit is contained in:
parent
dbcd1d1ae3
commit
a29b7e7153
14 changed files with 203 additions and 341 deletions
|
@ -8,19 +8,16 @@ require_once('boot.php');
|
|||
// Everything we need to boot standalone 'background' processes
|
||||
|
||||
function cli_startup() {
|
||||
|
||||
global $a, $db;
|
||||
global $a;
|
||||
|
||||
if (is_null($a)) {
|
||||
$a = new App(dirname(__DIR__));
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
||||
@include(".htconfig.php");
|
||||
require_once("dba.php");
|
||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
require_once('include/session.php');
|
||||
|
||||
|
@ -29,5 +26,4 @@ function cli_startup() {
|
|||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue