diff options
Diffstat (limited to 'include/queue.php')
-rw-r--r-- | include/queue.php | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/include/queue.php b/include/queue.php index 0bd12762f..a45d3ed63 100644 --- a/include/queue.php +++ b/include/queue.php @@ -1,36 +1,18 @@ <?php require_once("boot.php"); +require_once('include/cli_startup.php'); require_once('include/queue_fn.php'); function queue_run($argv, $argc){ - global $a, $db; - - 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); - }; + cli_startup(); + global $a; - require_once("session.php"); - require_once("datetime.php"); 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(); - - if($argc > 1) - $queue_id = intval($argv[1]); + if(argc() > 1) + $queue_id = intval(argv(1)); else $queue_id = 0; @@ -83,8 +65,6 @@ function queue_run($argv, $argc){ // delivery loop - require_once('include/salmon.php'); - foreach($r as $q_item) { // queue_predeliver hooks may have changed the queue db details, |