aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/items.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index 9ab39d7ae..dcc6c9b50 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4056,12 +4056,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;