require_once('include/bbcode.php');
if($argc < 3)
- exit;
+ return;
$a->set_baseurl(get_config('system','url'));
case 'mail':
default:
$item_id = intval($argv[2]);
- if(! $item_id)
- killme();
+ if(! $item_id){
+ killme(); return;
+ }
break;
}
$message = q("SELECT * FROM `mail` WHERE `id` = %d LIMIT 1",
intval($item_id)
);
- if(! count($message))
- killme();
+ if(! count($message)){
+ killme(); return;
+ }
$uid = $message[0]['uid'];
$recipients[] = $message[0]['contact-id'];
$item = $message[0];
$r = q("SELECT `parent`, `uid`, `edited` FROM `item` WHERE `id` = %d LIMIT 1",
intval($item_id)
);
- if(! count($r))
- killme();
+ if(! count($r)){
+ killme(); return;
+ }
$parent_id = $r[0]['parent'];
$uid = $r[0]['uid'];
intval($parent_id)
);
- if(! count($items))
- killme();
+ if(! count($items)){
+ killme(); return;
+ }
}
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`
if(count($r))
$owner = $r[0];
- else
- killme();
-
+ else {
+ killme(); return;
+ }
$hub = get_config('system','huburl');
// If this is a public conversation, notify the feed hub
$r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0");
- if( ! count($r))
- killme();
+ if( ! count($r)){
+ killme(); return;
+ }
$contacts = $r;
}
$r = q("SELECT * FROM `contact` WHERE `id` IN ( %s ) AND `blocked` = 0 ",
dbesc($recip_str)
);
- if(! count($r))
- killme();
-
+ if(! count($r)){
+ killme(); return;
+ }
// delivery loop
require_once('include/salmon.php');
$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;
$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) {