load db configs (config,system) for all "executables"
This commit is contained in:
parent
3eb0b4be2a
commit
994011ddb6
7 changed files with 34 additions and 23 deletions
|
@ -2,18 +2,22 @@
|
|||
require_once("boot.php");
|
||||
|
||||
function directory_run($argv, $argc){
|
||||
global $a, $db;
|
||||
global $a, $db;
|
||||
|
||||
if(is_null($a)){
|
||||
$a = new App;
|
||||
}
|
||||
if(is_null($a)) {
|
||||
$a = new App;
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
||||
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);
|
||||
};
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
|
||||
if($argc != 2)
|
||||
return;
|
||||
|
|
|
@ -22,6 +22,10 @@ function expire_run($argv, $argc){
|
|||
require_once('include/items.php');
|
||||
require_once('include/Contact.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ function notifier_run($argv, $argc){
|
|||
require_once('include/items.php');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
load_hooks();
|
||||
|
||||
if($argc < 3)
|
||||
|
|
|
@ -24,6 +24,9 @@ function poller_run($argv, $argc){
|
|||
require_once('include/Contact.php');
|
||||
require_once('include/email.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
|
|
@ -22,6 +22,9 @@ function queue_run($argv, $argc){
|
|||
require_once('include/items.php');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
load_config('config');
|
||||
load_config('system');
|
||||
|
||||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
load_hooks();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue