aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-14 17:49:35 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-14 17:49:35 -0700
commitc8e3ea955d21f764d7cc930bde207604beae3c9f (patch)
treea5f9cf9545032b931bc39f381aefbf783d937192 /include
parentb33a9a71f6d13efb68d140ecbc41cc442564cde0 (diff)
downloadvolse-hubzilla-c8e3ea955d21f764d7cc930bde207604beae3c9f.tar.gz
volse-hubzilla-c8e3ea955d21f764d7cc930bde207604beae3c9f.tar.bz2
volse-hubzilla-c8e3ea955d21f764d7cc930bde207604beae3c9f.zip
more mail sync work
Diffstat (limited to 'include')
-rw-r--r--include/identity.php14
-rw-r--r--include/import.php1
2 files changed, 7 insertions, 8 deletions
diff --git a/include/identity.php b/include/identity.php
index bb905e18f..ad5bfbe6d 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -635,8 +635,12 @@ function identity_basic_export($channel_id, $items = false) {
$r = q("select * from conv where uid = %d",
intval($channel_id)
);
- if($r)
+ if($r) {
+ for($x = 0; $x < count($r); $x ++) {
+ $r[$x]['subject'] = base64url_decode(str_rot47($r[$x]['subject']));
+ }
$ret['conv'] = $r;
+ }
$r = q("select mail.*, conv.guid as conv_guid from mail left join conv on mail.convid = conv.id where mail.uid = %d",
@@ -645,17 +649,11 @@ function identity_basic_export($channel_id, $items = false) {
if($r) {
$m = array();
foreach($r as $rr) {
-
-
-
-
+ $m[] = mail_encode($rr,true);
}
$ret['mail'] = $m;
}
-
-
-
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d",
intval($channel_id)
);
diff --git a/include/import.php b/include/import.php
index d5ff0d617..1734bd263 100644
--- a/include/import.php
+++ b/include/import.php
@@ -848,6 +848,7 @@ function import_mail($channel,$mails) {
$m = get_mail_elements($mail);
if(! $m)
continue;
+
if($mail['conv_guid']) {
$x = q("select id from conv where guid = '%s' and uid = %d limit 1",
dbesc($mail['conv_guid']),