streams/Zotlabs/Daemon/Deliver.php

32 lines
472 B
PHP
Raw Normal View History

2016-05-20 02:42:45 +00:00
<?php /** @file */
namespace Zotlabs\Daemon;
2018-06-01 02:42:13 +00:00
use Zotlabs\Lib\Libzot;
2018-07-03 05:43:41 +00:00
use Zotlabs\Lib\Queue;
2016-05-20 02:42:45 +00:00
class Deliver {
static public function run($argc,$argv) {
2016-05-20 02:42:45 +00:00
if($argc < 2)
return;
logger('deliver: invoked: ' . print_r($argv,true), LOGGER_DATA);
for($x = 1; $x < $argc; $x ++) {
2016-05-20 03:48:40 +00:00
if(! $argv[$x])
continue;
2016-05-20 02:42:45 +00:00
$r = q("select * from outq where outq_hash = '%s' limit 1",
dbesc($argv[$x])
);
if($r) {
2018-07-03 05:43:41 +00:00
Queue::deliver($r[0],true);
2016-05-20 02:42:45 +00:00
}
}
}
}