switch($contact['network']) {
case NETWORK_DFRN:
- logger('notifier: dfrndelivery: ' . $contact['name']);
+ logger('notifier: '.$target_item["guid"].' dfrndelivery: ' . $contact['name']);
$feed_template = get_markup_template('atom_feed.tpl');
$mail_template = get_markup_template('atom_mail.tpl');
if($normal_mode) {
if($item_id == $item['id'] || $item['id'] == $item['parent'])
$atom .= atom_entry($item,'text',null,$owner,true,(($top_level) ? $contact['id'] : 0));
- }
- else
+ } else
$atom .= atom_entry($item,'text',null,$owner,true);
-
}
}
$atom .= '</feed>' . "\r\n";
+ logger('notifier: '.$contact["url"].' '.$target_item["guid"].' entry: '.$atom, LOGGER_DEBUG);
+
logger('notifier: ' . $atom, LOGGER_DATA);
$basepath = implode('/', array_slice(explode('/',$contact['url']),0,3));
else
$deliver_status = (-1);
- logger('notifier: dfrn_delivery returns ' . $deliver_status);
+ logger('notifier: dfrn_delivery to '.$contact["url"].' with guid '.$target_item["guid"].' returns '.$deliver_status);
if($deliver_status == (-1)) {
logger('notifier: delivery failed: queuing message');
$datarray['owner-avatar'] = $own[0]['thumb'];
$datarray['contact-id'] = $importer['id'];
- if(($datarray['verb'] === ACTIVITY_LIKE)
+ if(($datarray['verb'] === ACTIVITY_LIKE)
|| ($datarray['verb'] === ACTIVITY_DISLIKE)
|| ($datarray['verb'] === ACTIVITY_ATTEND)
|| ($datarray['verb'] === ACTIVITY_ATTENDNO)
$datarray['last-child'] = 0;
// only one like or dislike per person
// splitted into two queries for performance issues
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`parent-uri` = '%s') and deleted = 0 limit 1",
+ $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `parent-uri` = '%s' AND NOT `deleted` LIMIT 1",
intval($datarray['uid']),
- intval($datarray['contact-id']),
+ dbesc($datarray['author-link']),
dbesc($datarray['verb']),
dbesc($datarray['parent-uri'])
if($r && count($r))
continue;
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`thr-parent` = '%s') and deleted = 0 limit 1",
+ $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1",
intval($datarray['uid']),
- intval($datarray['contact-id']),
+ dbesc($datarray['author-link']),
dbesc($datarray['verb']),
dbesc($datarray['parent-uri'])
$r = array_merge($r2,$r1,$r0);
if(count($r)) {
- logger('pubdeliver: ' . print_r($r,true), LOGGER_DEBUG);
+ logger('pubdeliver '.$target_item["guid"].': '.print_r($r,true), LOGGER_DEBUG);
// throw everything into the queue in case we get killed
}
if((! $mail) && (! $fsuggest) && (! $followup)) {
- logger('notifier: delivery agent: ' . $rr['name'] . ' ' . $rr['id']);
+ logger('notifier: delivery agent: '.$rr['name'].' '.$rr['id'].' '.$rr['network'].' '.$target_item["guid"]);
proc_run('php','include/delivery.php',$cmd,$item_id,$rr['id']);
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);