From a2cec8899ad191b47d116f4ea124be6bd5b05472 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 19 May 2016 22:26:37 -0700 Subject: daemon conversion continued... --- include/deliver.php | 87 ----------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 include/deliver.php (limited to 'include/deliver.php') diff --git a/include/deliver.php b/include/deliver.php deleted file mode 100644 index 12f28d6a9..000000000 --- a/include/deliver.php +++ /dev/null @@ -1,87 +0,0 @@ - json_encode(array('success' => true, 'pickup' => array(array('notify' => $notify,'message' => $mm))))); - zot_import($msg,z_root()); - } - } - else { - $msg = array('body' => json_encode(array('success' => true, 'pickup' => array(array('notify' => $notify,'message' => $m))))); - $dresult = zot_import($msg,z_root()); - } - - remove_queue_item($r[0]['outq_hash']); - - if($dresult && is_array($dresult)) { - foreach($dresult as $xx) { - if(is_array($xx) && array_key_exists('message_id',$xx)) { - if(delivery_report_is_storable($xx)) { - q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ", - dbesc($xx['message_id']), - dbesc($xx['location']), - dbesc($xx['recipient']), - dbesc($xx['status']), - dbesc(datetime_convert($xx['date'])), - dbesc($xx['sender']) - ); - } - } - } - } - - q("delete from dreport where dreport_queue = '%s'", - dbesc($argv[$x]) - ); - } - } - - // otherwise it's a remote delivery - call queue_deliver() with the $immediate flag - - queue_deliver($r[0],true); - - } - } -} - -if (array_search(__file__,get_included_files())===0){ - deliver_run($argc,$argv); - killme(); -} -- cgit v1.2.3