Explorar el Código

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.

tassium hace 22 años
padre
commit
e955659f91
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/search.php

+ 2 - 2
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 {