diff options
author | friendica <info@friendica.com> | 2013-07-15 19:04:23 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-07-15 19:04:23 -0700 |
commit | 4de52e601c8f26bff8f859e2ab598211db8865ae (patch) | |
tree | 8c293946503b5a6ede43d904eda00a06a55df802 | |
parent | 2cfd9a3fa9819d492a9718f0ae8cc7bb8fc3faac (diff) | |
download | volse-hubzilla-4de52e601c8f26bff8f859e2ab598211db8865ae.tar.gz volse-hubzilla-4de52e601c8f26bff8f859e2ab598211db8865ae.tar.bz2 volse-hubzilla-4de52e601c8f26bff8f859e2ab598211db8865ae.zip |
add channel_name to delivery logs because it is a bit more useful than an xchan_hash
-rwxr-xr-x | include/items.php | 3 | ||||
-rw-r--r-- | include/zot.php | 20 |
2 files changed, 12 insertions, 11 deletions
diff --git a/include/items.php b/include/items.php index 4a560afc9..b94992815 100755 --- a/include/items.php +++ b/include/items.php @@ -2051,7 +2051,8 @@ function tgroup_check($uid,$item) { $terms = get_terms_oftype($item['term'],TERM_MENTION); - logger('tgroup_check: post mentions: ' . print_r($terms,true), LOGGER_DATA); + if($terms) + logger('tgroup_check: post mentions: ' . print_r($terms,true), LOGGER_DATA); $link = normalise_link($a->get_baseurl() . '/channel/' . $u[0]['channel_address']); diff --git a/include/zot.php b/include/zot.php index 6dabd76a6..22f84b454 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1036,7 +1036,7 @@ function process_delivery($sender,$arr,$deliveries,$relay) { if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery)) { logger("permission denied for delivery {$channel['channel_id']}"); - $result[] = array($d['hash'],'permission denied'); + $result[] = array($d['hash'],'permission denied',$channel['channel_name']); continue; } @@ -1051,7 +1051,7 @@ function process_delivery($sender,$arr,$deliveries,$relay) { if($relay && $item_id) { logger('process_delivery: invoking relay'); proc_run('php','include/notifier.php','relay',intval($item_id)); - $result[] = array($d['hash'],'relayed'); + $result[] = array($d['hash'],'relayed',$channel['channel_name']); } continue; @@ -1082,7 +1082,7 @@ function process_delivery($sender,$arr,$deliveries,$relay) { $xyz = event_store($ev); - $result = array($d['hash'],'event processed'); + $result = array($d['hash'],'event processed',$channel['channel_name']); continue; } } @@ -1099,20 +1099,20 @@ function process_delivery($sender,$arr,$deliveries,$relay) { $arr['uid'] = $channel['channel_id']; update_imported_item($sender,$arr,$channel['channel_id']); } - $result[] = array($d['hash'],'updated'); + $result[] = array($d['hash'],'updated',$channel['channel_name']); $item_id = $r[0]['id']; } else { $arr['aid'] = $channel['channel_account_id']; $arr['uid'] = $channel['channel_id']; $item_id = item_store($arr); - $result[] = array($d['hash'],(($item_id) ? 'posted' : 'storage failed')); + $result[] = array($d['hash'],(($item_id) ? 'posted' : 'storage failed'),$channel['channel_name']); } if($relay && $item_id) { logger('process_delivery: invoking relay'); proc_run('php','include/notifier.php','relay',intval($item_id)); - $result[] = array($d['hash'],'relayed'); + $result[] = array($d['hash'],'relayed',$channel['channel_name']); } } @@ -1235,7 +1235,7 @@ function process_mail_delivery($sender,$arr,$deliveries) { if(! perm_is_allowed($channel['channel_id'],$sender['hash'],'post_mail')) { logger("permission denied for mail delivery {$channel['channel_id']}"); - $result[] = array($d['hash'],'permission denied'); + $result[] = array($d['hash'],'permission denied',$channel['channel_name']); continue; } @@ -1249,11 +1249,11 @@ function process_mail_delivery($sender,$arr,$deliveries) { intval($r[0]['id']), intval($channel['channel_id']) ); - $result[] = array($d['hash'],'mail recalled'); + $result[] = array($d['hash'],'mail recalled',$channel['channel_name']); logger('mail_recalled'); } else { - $result[] = array($d['hash'],'duplicate mail received'); + $result[] = array($d['hash'],'duplicate mail received',$channel['channel_name']); logger('duplicate mail received'); } continue; @@ -1262,7 +1262,7 @@ function process_mail_delivery($sender,$arr,$deliveries) { $arr['account_id'] = $channel['channel_account_id']; $arr['channel_id'] = $channel['channel_id']; $item_id = mail_store($arr); - $result[] = array($d['hash'],'mail delivered'); + $result[] = array($d['hash'],'mail delivered',$channel['channel_name']); } } |