aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php3
-rwxr-xr-xmod/like.php3
-rwxr-xr-xmod/mood.php4
-rw-r--r--mod/photos.php4
-rwxr-xr-xmod/subthread.php3
5 files changed, 12 insertions, 5 deletions
diff --git a/mod/item.php b/mod/item.php
index fd93d1dff..367a0c4be 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -689,7 +689,8 @@ function item_post(&$a) {
$post_id = 0;
- $post_id = item_store($datarray,$execflag);
+ $post = item_store($datarray,$execflag);
+ $post_id = $post['item_id'];
if($post_id) {
logger('mod_item: saved item ' . $post_id);
diff --git a/mod/like.php b/mod/like.php
index 0de65f129..84b0a6592 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -171,7 +171,8 @@ function like_content(&$a) {
$arr['deny_cid'] = $item['deny_cid'];
$arr['deny_gid'] = $item['deny_gid'];
- $post_id = item_store($arr);
+ $post = item_store($arr);
+ $post_id = $post['item_id'];
$arr['id'] = $post_id;
diff --git a/mod/mood.php b/mod/mood.php
index 7b6a0c392..83b8bfb57 100755
--- a/mod/mood.php
+++ b/mod/mood.php
@@ -84,7 +84,9 @@ function mood_init(&$a) {
$arr['verb'] = $activity;
$arr['body'] = $action;
- $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/' . $poster['nickname'] . '/' . $item_id),
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),
diff --git a/mod/subthread.php b/mod/subthread.php
index 66dc86eb2..11b7236fb 100755
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -142,7 +142,8 @@ EOT;
$arr['unseen'] = 1;
$arr['last-child'] = 0;
- $post_id = item_store($arr);
+ $post = item_store($arr);
+ $post_id = $post['item_id'];
if(! $item['visible']) {
$r = q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d LIMIT 1",