aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-02 16:26:33 -0700
committerzotlabs <mike@macgirvin.com>2017-10-02 16:26:33 -0700
commit5abdee73ee451eb1efd44f0d4a5c6697f36d25b0 (patch)
treecff77032e3551f0eec0feed16bd8038fc07412c7 /Zotlabs/Module
parent9dcbef4cb16bc2ac3c669832a8fbb2a583e48130 (diff)
downloadvolse-hubzilla-5abdee73ee451eb1efd44f0d4a5c6697f36d25b0.tar.gz
volse-hubzilla-5abdee73ee451eb1efd44f0d4a5c6697f36d25b0.tar.bz2
volse-hubzilla-5abdee73ee451eb1efd44f0d4a5c6697f36d25b0.zip
Clone sync deletions to comments (which belong to you) on wall posts (which do not).
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Item.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 3e023ae8b..34e818578 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -1105,21 +1105,28 @@ class Item extends \Zotlabs\Web\Controller {
// if this is a different page type or it's just a local delete
// but not by the item author or owner, do a simple deletion
-
+
+ $complex = false;
+
if(intval($i[0]['item_type']) || ($local_delete && (! $can_delete))) {
drop_item($i[0]['id']);
}
else {
// complex deletion that needs to propagate and be performed in phases
drop_item($i[0]['id'],true,DROPITEM_PHASE1);
- $r = q("select * from item where id = %d",
- intval($i[0]['id'])
- );
- if($r) {
- xchan_query($r);
- $sync_item = fetch_post_tags($r);
- build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
- }
+ $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);
+ build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
+ }
+
+ if($complex) {
tag_deliver($i[0]['uid'],$i[0]['id']);
}
}