aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-17 18:18:52 +0000
committerMario <mario@mariovavti.com>2021-08-17 18:18:52 +0000
commitdd296e1aaa3c7b992d7ec71a50ce92f74f78ca06 (patch)
tree24e77d206f0f719264fb8d0b66f5710c90db912a
parentc3bbc35e84bc8517064a55e362aeefb905d910b4 (diff)
downloadvolse-hubzilla-dd296e1aaa3c7b992d7ec71a50ce92f74f78ca06.tar.gz
volse-hubzilla-dd296e1aaa3c7b992d7ec71a50ce92f74f78ca06.tar.bz2
volse-hubzilla-dd296e1aaa3c7b992d7ec71a50ce92f74f78ca06.zip
more legacy mail cleanup - issue #1595
-rw-r--r--Zotlabs/Daemon/Cron.php7
-rw-r--r--Zotlabs/Module/Dreport.php24
-rw-r--r--include/channel.php3
-rw-r--r--include/connections.php17
4 files changed, 3 insertions, 48 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index 29a8902b0..c0a190c8e 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -48,13 +48,6 @@ class Cron {
db_quoteinterval('3 MINUTE')
);
- // expire any expired mail
-
- q("delete from mail where expires > '%s' and expires < %s ",
- dbesc(NULL_DATE),
- db_utcnow()
- );
-
require_once('include/account.php');
remove_expired_registrations();
diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php
index 50d1647c8..8906a4f81 100644
--- a/Zotlabs/Module/Dreport.php
+++ b/Zotlabs/Module/Dreport.php
@@ -46,15 +46,6 @@ class Dreport extends \Zotlabs\Web\Controller {
goaway(z_root() . '/dreport/' . (($encoded_mid) ? $encoded_mid : $mid));
}
- if($mid === 'mail') {
- $table = 'mail';
- $mid = ((argc() > 2) ? argv(2) : '');
- if(strpos($mid,'b64.') === 0)
- $mid = @base64url_decode(substr($mid,4));
-
- }
-
-
if(! $mid) {
notice( t('Invalid message') . EOL);
return;
@@ -68,12 +59,6 @@ class Dreport extends \Zotlabs\Web\Controller {
dbesc($channel['channel_hash'])
);
break;
- case 'mail':
- $i = q("select id from mail where mid = '%s' and from_xchan = '%s'",
- dbesc($mid),
- dbesc($channel['channel_hash'])
- );
- break;
default:
break;
}
@@ -131,15 +116,6 @@ class Dreport extends \Zotlabs\Web\Controller {
case 'recipient not found':
$r[$x]['dreport_result'] = t('recipient not found');
break;
- case 'mail recalled':
- $r[$x]['dreport_result'] = t('mail recalled');
- break;
- case 'duplicate mail received':
- $r[$x]['dreport_result'] = t('duplicate mail received');
- break;
- case 'mail delivered':
- $r[$x]['dreport_result'] = t('mail delivered');
- break;
default:
$r[$x]['gravity'] = 1;
break;
diff --git a/include/channel.php b/include/channel.php
index c9391c0d0..ed46904e7 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -2796,7 +2796,6 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
q("DELETE FROM pgrp WHERE uid = %d", intval($channel_id));
q("DELETE FROM pgrp_member WHERE uid = %d", intval($channel_id));
q("DELETE FROM event WHERE uid = %d", intval($channel_id));
- q("DELETE FROM mail WHERE channel_id = %d", intval($channel_id));
q("DELETE FROM menu WHERE menu_channel_id = %d", intval($channel_id));
q("DELETE FROM menu_item WHERE mitem_channel_id = %d", intval($channel_id));
@@ -2956,7 +2955,7 @@ function anon_identity_init($reqvars) {
}
if(! validate_email($anon_email)) {
- logger('enonymous email not valid');
+ logger('anonymous email not valid');
return false;
}
diff --git a/include/connections.php b/include/connections.php
index a1b27e301..59020051c 100644
--- a/include/connections.php
+++ b/include/connections.php
@@ -294,21 +294,15 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
drop_item($rr,false);
}
}
+
$r = q("delete from event where event_xchan = '%s'",
dbesc($xchan)
);
+
$r = q("delete from pgrp_member where xchan = '%s'",
dbesc($xchan)
);
- // Cannot delete just one side of the conversation since we do not allow
- // you to block private mail replies. This would leave open a gateway for abuse.
- // Both participants are owners of the conversation and both can remove it.
-
- $r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' )",
- dbesc($xchan),
- dbesc($xchan)
- );
$r = q("delete from xlink where ( xlink_xchan = '%s' or xlink_link = '%s' )",
dbesc($xchan),
dbesc($xchan)
@@ -318,7 +312,6 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
dbesc($xchan)
);
-
if($dirmode === false || $dirmode == DIRECTORY_MODE_NORMAL) {
$r = q("delete from xchan where xchan_hash = '%s'",
@@ -440,12 +433,6 @@ function contact_remove($channel_id, $abook_id) {
intval($channel_id)
);
- $r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' ) and channel_id = %d ",
- dbesc($abook['abook_xchan']),
- dbesc($abook['abook_xchan']),
- intval($channel_id)
- );
-
$r = q("delete from abconfig where chan = %d and xchan = '%s'",
intval($channel_id),
dbesc($abook['abook_xchan'])