diff options
author | Mario <mario@mariovavti.com> | 2021-05-28 08:11:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-05-28 08:11:40 +0000 |
commit | 0718ac514d2421a96ab191f874a0cd8b120a5a78 (patch) | |
tree | 61640e142ee1412b2fa2856d1ec09807cf4be0bc /include/import.php | |
parent | d289994da4b7717199abf8bf8d43b1a021f250fe (diff) | |
download | volse-hubzilla-0718ac514d2421a96ab191f874a0cd8b120a5a78.tar.gz volse-hubzilla-0718ac514d2421a96ab191f874a0cd8b120a5a78.tar.bz2 volse-hubzilla-0718ac514d2421a96ab191f874a0cd8b120a5a78.zip |
remove deprecated mail code
Diffstat (limited to 'include/import.php')
-rw-r--r-- | include/import.php | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/include/import.php b/include/import.php index 022440676..bf7f47c3e 100644 --- a/include/import.php +++ b/include/import.php @@ -1089,85 +1089,6 @@ function import_likes($channel, $likes) { } } -function import_conv($channel,$convs) { - if($channel && $convs) { - foreach($convs as $conv) { - if($conv['deleted']) { - q("delete from conv where guid = '%s' and uid = %d", - dbesc($conv['guid']), - intval($channel['channel_id']) - ); - continue; - } - - unset($conv['id']); - - $conv['uid'] = $channel['channel_id']; - $conv['subject'] = str_rot47(base64url_encode($conv['subject'])); - - $r = q("select id from conv where guid = '%s' and uid = %d limit 1", - dbesc($conv['guid']), - intval($channel['channel_id']) - ); - if($r) - continue; - - create_table_from_array('conv',$conv); - } - } -} - -/** - * @brief Import mails. - * - * @param array $channel - * @param array $mails - * @param boolean $sync (optional) default false - */ -function import_mail($channel, $mails, $sync = false) { - if($channel && $mails) { - foreach($mails as $mail) { - if(array_key_exists('flags',$mail) && in_array('deleted',$mail['flags'])) { - q("delete from mail where mid = '%s' and uid = %d", - dbesc($mail['message_id']), - intval($channel['channel_id']) - ); - continue; - } - if(array_key_exists('flags',$mail) && in_array('recalled',$mail['flags'])) { - q("update mail set mail_recalled = 1 where mid = '%s' and uid = %d", - dbesc($mail['message_id']), - intval($channel['channel_id']) - ); - continue; - } - - $m = get_mail_elements($mail); - if(! $m) - continue; - - $m['account_id'] = $channel['channel_account_id']; - $m['channel_id'] = $channel['channel_id']; - - $mail_id = mail_store($m); - if($sync && $mail_id) { - Zotlabs\Daemon\Master::Summon(array('Notifier','single_mail',$mail_id)); - } - } - } -} - -/** - * @brief Synchronise mails. - * - * @see import_mail() - * @param array $channel - * @param array $mails - */ -function sync_mail($channel, $mails) { - import_mail($channel, $mails, true); -} - /** * @brief Synchronise files. * |