aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-10-11 17:10:56 +0200
committerMario Vavti <mario@mariovavti.com>2024-10-11 17:10:56 +0200
commitd5291e9b074fbf408cdbf0ce88567e0a4ed48e07 (patch)
tree8c6a073b91e8627c4afd08c3e90828216d23e862 /include
parenta1818b1a29974132e16fb68c65c1b3a9904a5b18 (diff)
downloadvolse-hubzilla-d5291e9b074fbf408cdbf0ce88567e0a4ed48e07.tar.gz
volse-hubzilla-d5291e9b074fbf408cdbf0ce88567e0a4ed48e07.tar.bz2
volse-hubzilla-d5291e9b074fbf408cdbf0ce88567e0a4ed48e07.zip
containers: port core modules and attach_store_item()
Diffstat (limited to 'include')
-rw-r--r--include/attach.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/attach.php b/include/attach.php
index 654c9990d..768f5dd50 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1855,8 +1855,6 @@ function pipe_streams($in, $out, $bufsize = 16384) {
}
function attach_store_item($channel, $observer, $file) {
-
-
if(is_string($file)) {
$r = q("SELECT * FROM attach WHERE uid = %d AND hash = '%s' LIMIT 1",
intval($channel['channel_id']),
@@ -1906,10 +1904,11 @@ function attach_store_item($channel, $observer, $file) {
$post = item_store($arr);
- $item_id = $post['item_id'];
-
- if($item_id) {
- Master::Summon(['Notifier', 'activity', $item_id]);
+ if ($post['success']) {
+ Master::Summon(['Notifier', 'activity', $post['item_id']]);
+ if (!empty($post['approval_id'])) {
+ Master::Summon(['Notifier', 'activity', $post['approval_id']]);
+ }
}
*/
@@ -1999,10 +1998,11 @@ function attach_store_item($channel, $observer, $file) {
$post = item_store($arr);
- $item_id = $post['item_id'];
-
- if($item_id) {
- Master::Summon(['Notifier', 'activity', $item_id]);
+ if ($post['success']) {
+ Master::Summon(['Notifier', 'activity', $post['item_id']]);
+ if (!empty($post['approval_id'])) {
+ Master::Summon(['Notifier', 'activity', $post['approval_id']]);
+ }
}
}