aboutsummaryrefslogtreecommitdiffstats
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
parentd52dad3826ebed717dc7a9d24ac670cdd33e16f8 (diff)
downloadvolse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.tar.gz
volse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.tar.bz2
volse-hubzilla-5a78400f37a10943e26048917dab616b55c0cb13.zip
table cleanup
-rw-r--r--include/Contact.php8
-rw-r--r--include/items.php11
2 files changed, 19 insertions, 0 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 532ea2f95..ee434cb6d 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -23,16 +23,24 @@ function user_remove($uid) {
);
q("DELETE FROM `contact` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `gcign` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `group` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `group_member` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `intro` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `event` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `item` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `item_id` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `mail` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `mailacct` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `manage` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `notify` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `photo` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `attach` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `profile` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `profile_check` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `pconfig` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `search` WHERE `uid` = %d", intval($uid));
+ q("DELETE FROM `spam` WHERE `uid` = %d", intval($uid));
q("DELETE FROM `user` WHERE `uid` = %d", intval($uid));
if($uid == local_user()) {
unset($_SESSION['authenticated']);
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 ",