diff options
author | friendica <info@friendica.com> | 2013-09-10 19:06:06 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-10 19:06:06 -0700 |
commit | 3e5414cf35f3781297490e058c6d366bca45748e (patch) | |
tree | 3b317e302652df514c3fe7f1471c14932b1b67db /mod/photos.php | |
parent | 7ada499ca9a1424a59204d87edb5856f88a79b59 (diff) | |
download | volse-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 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/photos.php b/mod/photos.php index 7da3d3e92..d60029688 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -506,7 +506,9 @@ function photos_post(&$a) { . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource_id'] . '</id>'; $arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource_id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource_id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>'; - $item_id = item_store($arr); + $post = item_store($arr); + $item_id = $post['item_id']; + if($item_id) { q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1", dbesc($a->get_baseurl() . '/display/' . $owner_record['nickname'] . '/' . $item_id), |