aboutsummaryrefslogtreecommitdiffstats
path: root/include/cli_startup.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-25 16:55:33 -0700
committerredmatrix <git@macgirvin.com>2016-04-25 16:55:33 -0700
commitc3b0c0f32a17649503db67f208cce6f9e0cdc322 (patch)
treebd0ef639d079f5220c9b50737209a13fadbc10cd /include/cli_startup.php
parent6291c08e01edda16a9dbb1f58e91a829538fc25e (diff)
downloadvolse-hubzilla-c3b0c0f32a17649503db67f208cce6f9e0cdc322.tar.gz
volse-hubzilla-c3b0c0f32a17649503db67f208cce6f9e0cdc322.tar.bz2
volse-hubzilla-c3b0c0f32a17649503db67f208cce6f9e0cdc322.zip
remove global db variable
Diffstat (limited to 'include/cli_startup.php')
-rw-r--r--include/cli_startup.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/cli_startup.php b/include/cli_startup.php
index a99164d4c..a226f1345 100644
--- a/include/cli_startup.php
+++ b/include/cli_startup.php
@@ -1,6 +1,7 @@
<?php /** @file */
require_once('boot.php');
+require_once('include/dba/dba_driver.php');
// Everything we need to boot standalone 'background' processes
@@ -14,7 +15,7 @@ function cli_startup() {
App::init();
- if(is_null($db)) {
+ if(! DBA::$dba) {
@include(".htconfig.php");
$a->convert();
@@ -25,8 +26,7 @@ function cli_startup() {
App::$timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
date_default_timezone_set(App::$timezone);
- require_once('include/dba/dba_driver.php');
- $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
+ $db = DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
};