The order by statement must also order the contact UID, since the
UID is used as a tiebreaker between contacts which might be otherwise
identical, the search results must also be ordered by UID.
(sort_types[i] == E_BOOK_SORT_ASCENDING ? "ASC" : "DESC"));
}
+ /* Also order the UID, since it's our tie breaker, we must also order the UID field */
+ if (n_sort_fields > 0)
+ g_string_append (string, ", ");
+ g_string_append_printf (string, "summary.uid %s", reverse ? "DESC" : "ASC");
+
return g_string_free (string, FALSE);
}