From: tassium Date: Thu, 12 Dec 2002 20:23:16 +0000 (+0000) Subject: I found errors when using search on "all folders" X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cf6cb8b1a952371f88b84f6bf556efb8408a628e;p=squirrelmail.git I found errors when using search on "all folders" 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 --- diff --git a/src/search.php b/src/search.php index ab1def04..fcdbf000 100644 --- a/src/search.php +++ b/src/search.php @@ -191,8 +191,8 @@ function save_recent($save_index, $username, $data_dir) { 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 {