diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-14 19:56:04 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-14 19:56:04 -0400 |
commit | eeaafe9f3918661022b465fe0522a3f0e44065b0 (patch) | |
tree | b0e2e941b670419950630a4cfc2b0078da69b502 /include/connections.php | |
parent | 6430a232f88ed214997d7704c18aead873094a0f (diff) | |
parent | 0ef2622621867fa197988974b47eff85f20a80e7 (diff) | |
download | volse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.tar.gz volse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.tar.bz2 volse-hubzilla-eeaafe9f3918661022b465fe0522a3f0e44065b0.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'include/connections.php')
-rw-r--r-- | include/connections.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/connections.php b/include/connections.php index 2d10b8354..ed4526a09 100644 --- a/include/connections.php +++ b/include/connections.php @@ -283,18 +283,30 @@ function channel_remove($channel_id, $local = true, $unset_session=false) { Zotlabs\Daemon\Master::Summon(array('Notifier','purge_all',$channel_id)); } + + $r = q("select * from iconfig left join item on item.id = iconfig.iid + where item.uid = %d", + intval($channel_id) + ); + if($r) { + foreach($r as $rr) { + q("delete from iconfig where iid = %d", + intval($rr['iid']) + ); + } + } + + q("DELETE FROM `groups` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `group_member` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `event` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `item` WHERE `uid` = %d", intval($channel_id)); - q("DELETE FROM `item_id` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `mail` WHERE `channel_id` = %d", intval($channel_id)); q("DELETE FROM `notify` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `photo` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `attach` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `profile` WHERE `uid` = %d", intval($channel_id)); q("DELETE FROM `pconfig` WHERE `uid` = %d", intval($channel_id)); - q("DELETE FROM `spam` WHERE `uid` = %d", intval($channel_id)); // @FIXME At this stage we need to remove the file resources located under /store/$nickname |