aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meer <michael@meer.name>2013-01-23 13:50:57 +0100
committerMichael Meer <michael@meer.name>2013-01-23 13:50:57 +0100
commitfca354aa463e84b67fe62e4067905e8f363c0e80 (patch)
treef0e1fbf404e5917ed0a7c69ea55b126d5cb86fcd
parent1502e3971e3f50a939bd27ec949ccaba2940e0b0 (diff)
downloadvolse-hubzilla-fca354aa463e84b67fe62e4067905e8f363c0e80.tar.gz
volse-hubzilla-fca354aa463e84b67fe62e4067905e8f363c0e80.tar.bz2
volse-hubzilla-fca354aa463e84b67fe62e4067905e8f363c0e80.zip
delete of single items should now work again
-rwxr-xr-xinclude/items.php14
1 files changed, 10 insertions, 4 deletions
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;