summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--privatemsg.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/privatemsg.module b/privatemsg.module
index ca709de..af7460f 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -1045,7 +1045,7 @@ function privatemsg_sql_list(&$fragments, $account, $argument = 'list') {
// We can use tablesort_sql now, but we don't need the ORDER BY part of the query.
// Because of that, we need to cut off the first 9 characters of the generated string
- $order_by = drupal_substr(tablesort_sql(_privatemsg_list_headers( FALSE, array('subject', 'last_updated') + $fields), 'is_new DESC,'), 9);
+ $order_by = drupal_substr(tablesort_sql(_privatemsg_list_headers( FALSE, array('subject', 'last_updated') + $fields), 'MAX(pmi.is_new) DESC,'), 9);
$fragments['order_by'][] = $order_by;
}