Skip to content

Commit

Permalink
IMAP: fix SORT-ing on multiple criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
pjstevns committed Apr 6, 2012
1 parent 64cedfa commit 9e2f272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dbmail-mailbox.c
Expand Up @@ -1064,7 +1064,7 @@ static gboolean _do_sort(GNode *node, DbmailMailbox *self)
if (s->searched) return FALSE;

q = g_string_new("");
g_string_printf(q, "SELECT message_idnr FROM %smessages m "
g_string_printf(q, "SELECT DISTINCT(message_idnr) FROM %smessages m "
"LEFT JOIN %sphysmessage p ON m.physmessage_id=p.id "
"%s"
"WHERE m.mailbox_idnr = %llu AND m.status IN (%d,%d) "
Expand Down

0 comments on commit 9e2f272

Please sign in to comment.