aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-06-01 08:17:59 +0200
committerGitHub <noreply@github.com>2017-06-01 08:17:58 +0200
commit927313968aa2bd60464ef754c64ccaa746a8fed3 (patch)
tree6cda3af8e47c744bd8f55734641f2a55911b70d0 /include
parent2e54024b92b8d1a86771c20831495d498f96d690 (diff)
parent8ebb0006507e12f8570ea126c4146ea14b71fd7f (diff)
downloadvolse-hubzilla-927313968aa2bd60464ef754c64ccaa746a8fed3.tar.gz
volse-hubzilla-927313968aa2bd60464ef754c64ccaa746a8fed3.tar.bz2
volse-hubzilla-927313968aa2bd60464ef754c64ccaa746a8fed3.zip
Merge pull request #805 from zotlabs/mailexport
minor export issue with mail
Diffstat (limited to 'include')
-rw-r--r--include/channel.php4
-rw-r--r--include/message.php10
2 files changed, 8 insertions, 6 deletions
diff --git a/include/channel.php b/include/channel.php
index 31dca1ae5..2284b3004 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -736,14 +736,14 @@ function identity_basic_export($channel_id, $sections = null) {
$ret['conv'] = $r;
}
- $r = q("select * from mail where mail.uid = %d",
+ $r = q("select * from mail where channel_id = %d",
intval($channel_id)
);
if($r) {
$m = array();
foreach($r as $rr) {
xchan_mail_query($rr);
- $m[] = mail_encode($rr,true);
+ $m[] = encode_mail($rr,true);
}
$ret['mail'] = $m;
}
diff --git a/include/message.php b/include/message.php
index 4e8e44adc..609ceb354 100644
--- a/include/message.php
+++ b/include/message.php
@@ -441,10 +441,12 @@ function private_messages_drop($channel_id, $messageitem_id, $drop_conversation
intval($channel_id)
);
if($z) {
- q("delete from conv where guid = '%s' and uid = %d",
- dbesc($x[0]['conv_guid']),
- intval($channel_id)
- );
+ if($x[0]['conv_guid']) {
+ q("delete from conv where guid = '%s' and uid = %d",
+ dbesc($x[0]['conv_guid']),
+ intval($channel_id)
+ );
+ }
$m['mail'] = array();
foreach($z as $zz) {
xchan_mail_query($zz);