diff options
author | Mario Vavti <mario@mariovavti.com> | 2024-11-08 20:18:20 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2024-11-08 20:18:20 +0100 |
commit | 0481901b593f861366f9a766e0f020cce7a31be7 (patch) | |
tree | 9bf66881b0c0564fb6881831d1eaa06df6657e09 /Zotlabs/Module/Item.php | |
parent | 4b4cac63fd4597b5c3090377196c8ad970900b21 (diff) | |
download | volse-hubzilla-0481901b593f861366f9a766e0f020cce7a31be7.tar.gz volse-hubzilla-0481901b593f861366f9a766e0f020cce7a31be7.tar.bz2 volse-hubzilla-0481901b593f861366f9a766e0f020cce7a31be7.zip |
refactor drop_item[s]() for containers
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index e67566db9..cb9925c01 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1494,7 +1494,6 @@ class Item extends Controller { $can_delete = true; } - if (!($can_delete || $local_delete)) { notice(t('Permission denied.') . EOL); return; @@ -1510,13 +1509,14 @@ class Item extends Controller { } else { // complex deletion that needs to propagate and be performed in phases - drop_item($i[0]['id'], true, DROPITEM_PHASE1); + drop_item($i[0]['id'], DROPITEM_PHASE1); $complex = true; } $r = q("select * from item where id = %d", intval($i[0]['id']) ); + if ($r) { xchan_query($r); $sync_item = fetch_post_tags($r); @@ -1525,6 +1525,9 @@ class Item extends Controller { if ($complex) { tag_deliver($i[0]['uid'], $i[0]['id']); + if (intval($i[0]['item_wall']) || $i[0]['mid'] !== $i[0]['parent_mid']) { + Master::Summon(['Notifier', 'drop', $dropped_item['id']]); + } } } |