diff options
author | Olaf Conradi <oohlaf@gmail.com> | 2013-01-23 06:28:40 -0800 |
---|---|---|
committer | Olaf Conradi <oohlaf@gmail.com> | 2013-01-23 06:28:40 -0800 |
commit | 5206a8daf782f77ee9cfa48aaa6bc5119fef6d66 (patch) | |
tree | 0598ca01364c269809f5139dc480f123921675e4 | |
parent | 0b18dd15c5377da121f0fb781c0530ca0d328eb9 (diff) | |
parent | 657a02ad3ccd32753ce149aceeac67d1169ab230 (diff) | |
download | volse-hubzilla-5206a8daf782f77ee9cfa48aaa6bc5119fef6d66.tar.gz volse-hubzilla-5206a8daf782f77ee9cfa48aaa6bc5119fef6d66.tar.bz2 volse-hubzilla-5206a8daf782f77ee9cfa48aaa6bc5119fef6d66.zip |
Merge pull request #24 from MicMee/master
delete item should now work again - 2nd attempt
-rwxr-xr-x | include/items.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php index 9ab39d7ae..4832c2916 100755 --- a/include/items.php +++ b/include/items.php @@ -4056,12 +4056,20 @@ 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', + `edited` = '%s' WHERE `id` = %d LIMIT 1", + intval(ITEM_DELETED), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + intval($item['id']) ); + + // clean up categories and tags so they don't end up as orphans $matches = false; |