aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-12 05:15:45 -0700
committerfriendica <info@friendica.com>2012-04-12 05:15:45 -0700
commit5a78400f37a10943e26048917dab616b55c0cb13 (patch)
tree43cf2294f452053f50d759e1e3ebc3b3f95435f0 /include/items.php
parentd52dad3826ebed717dc7a9d24ac670cdd33e16f8 (diff)
downloadvolse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.tar.gz
volse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.tar.bz2
volse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.zip
table cleanup
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 ",