diff options
author | mrjive <mrjive@mrjive.it> | 2015-09-22 13:11:54 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-09-22 13:11:54 +0200 |
commit | 5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d (patch) | |
tree | ece0274497ae0f3bc427cfa6e8f10752dd9934dc /include/items.php | |
parent | 49d11ed9f88531bcd03f2f129230b0352014c22c (diff) | |
parent | 4b13f0e025b08263d7231845bc76034d9adc7847 (diff) | |
download | volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.gz volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.bz2 volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.zip |
Merge pull request #3 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 657168601..b209e55c5 100755 --- a/include/items.php +++ b/include/items.php @@ -4417,6 +4417,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). |