aboutsummaryrefslogtreecommitdiffstats
path: root/include/message.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-01-09 09:00:20 +0100
committerMario <mario@mariovavti.com>2018-01-09 09:00:20 +0100
commit4f4d0e416eac87121898b8a27b1afa6065ff17a2 (patch)
treeaae7f2582b2b9c6596dcbf87c06a836434140830 /include/message.php
parent22c89b6c660e185d5c5c6362acf23b145d932d15 (diff)
parent8fde0f01b8472082158b38386046ed606bcfbc49 (diff)
downloadvolse-hubzilla-3.0.tar.gz
volse-hubzilla-3.0.tar.bz2
volse-hubzilla-3.0.zip
Merge branch '3.0RC'3.0
Diffstat (limited to 'include/message.php')
-rw-r--r--include/message.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/message.php b/include/message.php
index 477c7172c..4a673b961 100644
--- a/include/message.php
+++ b/include/message.php
@@ -215,7 +215,7 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
return $ret;
}
- if(count($images)) {
+ if($images) {
foreach($images as $image) {
if(! stristr($image,z_root() . '/photo/'))
continue;
@@ -335,12 +335,9 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) {
case 'combined':
default:
-
- $parents = q("SELECT parent_mid FROM mail WHERE mid = parent_mid AND channel_id = %d ORDER BY created DESC",
+ $parents = q("SELECT mail.parent_mid FROM mail LEFT JOIN conv ON mail.conv_guid = conv.guid WHERE mail.mid = mail.parent_mid AND mail.channel_id = %d ORDER BY conv.updated DESC $limit",
dbesc($local_channel)
);
- //FIXME: We need the latest mail of a thread here. This query throws errors in postgres. We now look for the latest in php until somebody can fix this...
- //$sql = "SELECT * FROM ( SELECT * FROM mail WHERE channel_id = $local_channel ORDER BY created DESC $limit ) AS temp_table GROUP BY parent_mid ORDER BY created DESC";
break;
}