diff options
author | zotlabs <mike@macgirvin.com> | 2017-05-31 20:59:36 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-05-31 21:01:51 -0700 |
commit | 8ebb0006507e12f8570ea126c4146ea14b71fd7f (patch) | |
tree | 820c290627ca3245c87c8c5a965e2eb590a52abe /include | |
parent | 14229d0dd3205ea1e85d2c26d6c79bd68d19eda3 (diff) | |
download | volse-hubzilla-8ebb0006507e12f8570ea126c4146ea14b71fd7f.tar.gz volse-hubzilla-8ebb0006507e12f8570ea126c4146ea14b71fd7f.tar.bz2 volse-hubzilla-8ebb0006507e12f8570ea126c4146ea14b71fd7f.zip |
minor export issue with mail
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 4 | ||||
-rw-r--r-- | include/message.php | 10 |
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); |