Mods to script runned via CLI to permits to run also included

This commit is contained in:
fabrixxm 2011-01-24 22:01:56 +01:00
parent e9251499dd
commit 2020ea23b1
4 changed files with 33 additions and 26 deletions

View file

@ -19,11 +19,12 @@
$a->set_baseurl(get_config('system','url'));
logger('poller: start');
// run queue delivery process in the background
$php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
proc_close(proc_open("\"$php_path\" \"include/queue.php\" &", array(), $foo));
//proc_close(proc_open("\"$php_path\" \"include/queue.php\" &", array(), $foo));
proc_run($php_path,"include/queue.php");
$hub_update = false;
@ -46,8 +47,9 @@
$sql_extra
AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()");
if(! count($contacts))
killme();
if(! count($contacts)){
killme(); return;
}
foreach($contacts as $contact) {