Setup was horked after this commit and I couldn't easily make it right so reverting - will try again at a future date

Revert "remove global db variable"

This reverts commit c3b0c0f32a.
This commit is contained in:
redmatrix
2016-04-25 20:12:36 -07:00
parent 6bf7716518
commit d62f490814
6 changed files with 96 additions and 85 deletions

View File

@@ -1,7 +1,6 @@
<?php /** @file */
require_once('boot.php');
require_once('include/dba/dba_driver.php');
// Everything we need to boot standalone 'background' processes
@@ -15,7 +14,7 @@ function cli_startup() {
App::init();
if(! DBA::$dba) {
if(is_null($db)) {
@include(".htconfig.php");
$a->convert();
@@ -26,7 +25,8 @@ function cli_startup() {
App::$timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
date_default_timezone_set(App::$timezone);
$db = DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
require_once('include/dba/dba_driver.php');
$db = 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);
};