aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2015-09-23 08:59:28 +0200
committerzottel <github@zottel.net>2015-09-23 08:59:28 +0200
commit0bfdb45b414b477573b6389e7730d8f93f53993e (patch)
tree114c0dc95c4cf3baa514de13ca2ed0c1759dd388 /include/items.php
parent032ef0ca3495cf4a1caaf1a6ea8000c17aba0ba5 (diff)
parentf506f73d3fc80fb68f63f654b5e93a6920780d6f (diff)
downloadvolse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.tar.gz
volse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.tar.bz2
volse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 657168601..7793d1fb2 100755
--- a/include/items.php
+++ b/include/items.php
@@ -836,6 +836,7 @@ function title_is_body($title, $body) {
function get_item_elements($x,$allow_code = false) {
$arr = array();
+
if($allow_code)
$arr['body'] = $x['body'];
else
@@ -4417,6 +4418,18 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
intval($item['uid'])
);
+ // remove delivery reports
+
+ $c = q("select channel_hash from channel where channel_id = %d limit 1",
+ intval($item['uid'])
+ );
+ if($c) {
+ q("delete from dreport where dreport_xchan = '%s' and dreport_mid = '%s'",
+ dbesc($c[0]['channel_hash']),
+ dbesc($item['mid'])
+ );
+ }
+
// network deletion request. Keep the message structure so that we can deliver delete notifications.
// Come back after several days (or perhaps a month) to do the lowlevel delete (DROPITEM_PHASE2).