X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdelivery.php;h=098e423d170d9d6efb8dd7e3903fb6e6cc307e36;hb=44efdc3e1b01328a226c79e25834fe7adb2dbaf4;hp=8ccb19cedc187842e156d4efb919af46ead5cfae;hpb=e1eb9231f4f604ee9429a294c0c857db5a09fada;p=friendica.git diff --git a/include/delivery.php b/include/delivery.php index 8ccb19cedc..098e423d17 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -1,45 +1,27 @@ set_baseurl(get_config('system','url')); - logger('delivery: invoked: '. print_r($argv,true), LOGGER_DEBUG); $cmd = $argv[1]; @@ -49,30 +31,6 @@ function delivery_run(&$argv, &$argc){ $contact_id = intval($argv[$x]); - /// @todo When switching completely to the worker we won't need this anymore - // Some other process may have delivered this item already. - - $r = q("SELECT * FROM `deliverq` WHERE `cmd` = '%s' AND `item` = %d AND `contact` = %d LIMIT 1", - dbesc($cmd), - dbesc($item_id), - dbesc($contact_id) - ); - if (!dbm::is_result($r)) { - continue; - } - - if ($a->maxload_reached()) { - return; - } - - // It's ours to deliver. Remove it from the queue. - - q("DELETE FROM `deliverq` WHERE `cmd` = '%s' AND `item` = %d AND `contact` = %d", - dbesc($cmd), - dbesc($item_id), - dbesc($contact_id) - ); - if (!$item_id || !$contact_id) { continue; } @@ -208,7 +166,7 @@ function delivery_run(&$argv, &$argc){ $public_message = true; if (!($mail || $fsuggest || $relocate)) { - require_once('include/group.php'); + require_once 'include/group.php'; $parent = $items[0]; @@ -577,8 +535,3 @@ function delivery_run(&$argv, &$argc){ return; } - -if (array_search(__file__,get_included_files())===0){ - delivery_run($_SERVER["argv"],$_SERVER["argc"]); - killme(); -}