aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-10 19:06:06 -0700
committerfriendica <info@friendica.com>2013-09-10 19:06:06 -0700
commit3e5414cf35f3781297490e058c6d366bca45748e (patch)
tree3b317e302652df514c3fe7f1471c14932b1b67db /include/zot.php
parent7ada499ca9a1424a59204d87edb5856f88a79b59 (diff)
downloadvolse-hubzilla-3e5414cf35f3781297490e058c6d366bca45748e.tar.gz
volse-hubzilla-3e5414cf35f3781297490e058c6d366bca45748e.tar.bz2
volse-hubzilla-3e5414cf35f3781297490e058c6d366bca45748e.zip
provide detailed error to remote site for the myriad of things that can go wrong inside item_store(), !! this changes the return of item_store !!
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index e9084496c..6deee4d52 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1154,8 +1154,9 @@ function process_delivery($sender,$arr,$deliveries,$relay) {
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'),$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
+ $item_result = item_store($arr);
+ $item_id = $item_result['item_id'];
+ $result[] = array($d['hash'],(($item_id) ? 'posted' : 'storage failed:' . $item_result['message']),$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
}
if($relay && $item_id) {
@@ -1238,8 +1239,11 @@ function remove_community_tag($sender,$arr,$uid) {
function update_imported_item($sender,$item,$uid) {
- item_store_update($item);
- logger('update_imported_item');
+ $x = item_store_update($item);
+ if(! $x['item_id'])
+ logger('update_imported_item: failed: ' . $x['message']);
+ else
+ logger('update_imported_item');
}