when deleting items, delete linked events and photos during stage1
This commit is contained in:
parent
a22ec8cbfa
commit
ee3a4902de
@ -3727,19 +3727,7 @@ function delete_item_lowlevel($item,$stage = DROPITEM_NORMAL) {
|
|||||||
intval($item['uid'])
|
intval($item['uid'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// If item is a link to a photo/event resource, nuke all the associated photos/events
|
||||||
// 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
|
|
||||||
// This only applies to photos uploaded from the photos page. Photos inserted into a post do not
|
// 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.
|
// 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",
|
q("delete from item_id where iid = %d and uid = %d limit 1",
|
||||||
intval($item['id']),
|
intval($item['id']),
|
||||||
intval($item['uid'])
|
intval($item['uid'])
|
||||||
|
10183
util/messages.po
10183
util/messages.po
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
|||||||
2014-07-03.725
|
2014-07-04.726
|
||||||
|
Reference in New Issue
Block a user