when deleting items, delete linked events and photos during stage1

This commit is contained in:
friendica 2014-07-04 20:34:54 -07:00
parent a22ec8cbfa
commit ee3a4902de
3 changed files with 5188 additions and 5023 deletions

View File

@ -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'])

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
2014-07-03.725
2014-07-04.726