aboutsummaryrefslogtreecommitdiffstats
path: root/include/message.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-14 14:50:36 -0800
committerzotlabs <mike@macgirvin.com>2017-11-14 14:50:36 -0800
commitd43542dd7a64136626550ba0569b1939b84b8146 (patch)
treef19c6f9716fcc9fe72e573d778bb45eb1c397051 /include/message.php
parent59caf141d1e271ee4a6e7ab8b66f4070835dde95 (diff)
parent3c3c0ed34269cecdbda1288eab5b63c664a8859c (diff)
downloadvolse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.gz
volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.bz2
volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/message.php')
-rw-r--r--include/message.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/message.php b/include/message.php
index 477c7172c..b57d2e068 100644
--- a/include/message.php
+++ b/include/message.php
@@ -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;
}