From fca354aa463e84b67fe62e4067905e8f363c0e80 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 23 Jan 2013 13:50:57 +0100 Subject: delete of single items should now work again --- include/items.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 0217884fd..a462c8073 100755 --- a/include/items.php +++ b/include/items.php @@ -4057,12 +4057,18 @@ function drop_item($id,$interactive = true) { // delete the item - $r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($item['id']) + $r = q(" UPDATE `item` SET + `item_restrict` = (item_restrict|%d) , + `title` = '', + `body` = '', + `changed` = '%s' WHERE `id` = %d LIMIT 1", + intval(ITEM_DELETED), + dbesc(datetime_convert()), + intval($item['id']) ); + + // clean up categories and tags so they don't end up as orphans $matches = false; -- cgit v1.2.3 From 657a02ad3ccd32753ce149aceeac67d1169ab230 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 23 Jan 2013 15:06:49 +0100 Subject: delete item: change of timestamp last edit --- include/items.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index dcc6c9b50..4832c2916 100755 --- a/include/items.php +++ b/include/items.php @@ -4060,9 +4060,11 @@ function drop_item($id,$interactive = true) { `item_restrict` = (item_restrict|%d) , `title` = '', `body` = '', - `changed` = '%s' WHERE `id` = %d LIMIT 1", + `changed` = '%s', + `edited` = '%s' WHERE `id` = %d LIMIT 1", intval(ITEM_DELETED), dbesc(datetime_convert()), + dbesc(datetime_convert()), intval($item['id']) ); -- cgit v1.2.3