aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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']),