aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 3a931b68c..05c0d5016 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2974,12 +2974,23 @@ function item_expire($uid,$days) {
if($expire_items==0 && $item['type']!='note')
continue;
+
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($item['id'])
);
+ $r = q("DELETE FROM item_id where iid in (select id from item where parent = %d) and uid = %d",
+ intval($item['id']),
+ intval($uid)
+ );
+
+ $r = q("DELETE FROM sign where iid in (select id from item where parent = %d) and uid = %d",
+ intval($item['id']),
+ intval($uid)
+ );
+
// kill the kids
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d ",