aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.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/photos.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/photos.php')
-rw-r--r--include/photos.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/photos.php b/include/photos.php
index c670bd90c..517212e57 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -222,7 +222,8 @@ function photo_upload($channel, $observer, $args) {
. '[zmg]' . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
. '[/zrl]';
- $item_id = item_store($arr);
+ $result = item_store($arr);
+ $item_id = $result['item_id'];
if($visible)
proc_run('php', "include/notifier.php", 'wall-new', $item_id);
@@ -402,7 +403,8 @@ function photos_create_item($channel, $creator_hash, $photo, $visible = false) {
. '[zmg]' . z_root() . '/photo/' . $photo['resource_id'] . '-' . $photo['scale'] . '[/zmg]'
. '[/zrl]';
- $item_id = item_store($arr);
+ $result = item_store($arr);
+ $item_id = $result['item_id'];
return $item_id;
} \ No newline at end of file