aboutsummaryrefslogtreecommitdiffstats
path: root/include/delivery.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2012-10-23 21:26:12 +1100
committerMike Macgirvin <mike@macgirvin.com>2012-10-23 21:26:12 +1100
commit7acba41dc67e85fe889f7213c9ba0ba158983f81 (patch)
tree08ab0d31599b17a58914a351da71c651937e7f71 /include/delivery.php
parent672da80282d4a99adb12fc09bde89af656f0b13b (diff)
downloadvolse-hubzilla-7acba41dc67e85fe889f7213c9ba0ba158983f81.tar.gz
volse-hubzilla-7acba41dc67e85fe889f7213c9ba0ba158983f81.tar.bz2
volse-hubzilla-7acba41dc67e85fe889f7213c9ba0ba158983f81.zip
more cleanup
Diffstat (limited to 'include/delivery.php')
-rw-r--r--include/delivery.php34
1 files changed, 8 insertions, 26 deletions
diff --git a/include/delivery.php b/include/delivery.php
index 0d99f48a2..1c6b55164 100644
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -1,46 +1,28 @@
<?php
require_once("boot.php");
+require_once('include/cli_startup.php');
require_once('include/queue_fn.php');
require_once('include/html2plain.php');
function delivery_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');
- require_once('include/email.php');
- load_config('config');
- load_config('system');
-
- load_hooks();
-
- if($argc < 3)
+ if(argc() < 3)
return;
- $a->set_baseurl(get_config('system','url'));
-
logger('delivery: invoked: ' . print_r($argv,true), LOGGER_DEBUG);
- $cmd = $argv[1];
- $item_id = intval($argv[2]);
+ $cmd = argv(1);
+ $item_id = intval(argv(2));
- for($x = 3; $x < $argc; $x ++) {
+ for($x = 3; $x < argc(); $x ++) {
- $contact_id = intval($argv[$x]);
+ $contact_id = intval(argv($x));
// Some other process may have delivered this item already.