Turns out calc_msort() was being called for all folders, even the ones without any messages. Moved the call to calc_msort() into the if block that checks for messages.
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4265
7612ce4b-ef26-0410-bec9-
ea0150e637f0
function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $where, $what, $usecache = false, $newsort = false) {
global $sort, $color;
- $msort = calc_msort($msgs, $sort);
- if ($cnt > 0) {
+ if ($cnt > 0) {
+ $msort = calc_msort($msgs, $sort);
if ( $mailbox == 'INBOX' ) {
$showbox = _("INBOX");
} else {