diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/items.php b/include/items.php index 7bb47a284..7f4dabaa7 100755 --- a/include/items.php +++ b/include/items.php @@ -3727,19 +3727,7 @@ function delete_item_lowlevel($item,$stage = DROPITEM_NORMAL) { intval($item['uid']) ); - - // 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). - - if($stage == DROPITEM_PHASE1) - return true; - - $r = q("delete from term where otype = %d and oid = %d limit 1", - intval(TERM_OBJ_POST), - intval($item['id']) - ); - - // If item is a link to a photo resource, nuke all the associated photos + // If item is a link to a photo/event resource, nuke all the associated photos/events // This only applies to photos uploaded from the photos page. Photos inserted into a post do not // generate a resource_id and therefore aren't intimately linked to the item. @@ -3758,6 +3746,18 @@ function delete_item_lowlevel($item,$stage = DROPITEM_NORMAL) { } } + + // 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). + + if($stage == DROPITEM_PHASE1) + return true; + + $r = q("delete from term where otype = %d and oid = %d limit 1", + intval(TERM_OBJ_POST), + intval($item['id']) + ); + q("delete from item_id where iid = %d and uid = %d limit 1", intval($item['id']), intval($item['uid']) |