From: Jason M. <jm...@us...> - 2002-04-16 05:45:21
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv11456/functions Modified Files: imap_messages.php mailbox_display.php Log Message: fix E_ALL warnings when server/thread sorting not supported Index: imap_messages.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_messages.php,v retrieving revision 1.92 retrieving revision 1.93 diff -u -w -r1.92 -r1.93 --- imap_messages.php 15 Apr 2002 22:35:45 -0000 1.92 +++ imap_messages.php 16 Apr 2002 05:45:16 -0000 1.93 @@ -130,9 +130,11 @@ fputs($imap_stream, $sort_query); $sort_test = sqimap_read_data($imap_stream, $sid, false, $response, $message); } + if (isset($sort_test[0])) { if (preg_match("/^\* SORT (.+)$/", $sort_test[0], $regs)) { $server_sort_array = preg_split("/ /", trim($regs[1])); } + } if ($sort == 0 || $sort == 2 || $sort == 4) { $server_sort_array = array_reverse($server_sort_array); } @@ -256,8 +258,10 @@ $thread_query = "$sid THREAD $sort_type ".strtoupper($default_charset)." ALL\r\n"; fputs($imap_stream, $thread_query); $thread_test = sqimap_read_data($imap_stream, $sid, false, $response, $message); + if (isset($thread_test[0])) { if (preg_match("/^\* THREAD (.+)$/", $thread_test[0], $regs)) { $thread_list = trim($regs[1]); + } } else { $thread_list = ""; Index: mailbox_display.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v retrieving revision 1.230 retrieving revision 1.231 diff -u -w -r1.230 -r1.231 --- mailbox_display.php 14 Apr 2002 03:00:40 -0000 1.230 +++ mailbox_display.php 16 Apr 2002 05:45:16 -0000 1.231 @@ -161,8 +161,10 @@ case 4: /* subject */ echo " <td bgcolor=\"$hlt_color\">$bold"; if ($thread_sort_messages == 1) { + if (isset($indent_array[$msg["ID"]])) { echo str_repeat(" ",$indent_array[$msg["ID"]]); } + } echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=" . $msg["ID"] . "&startMessage=$start_msg&show_more=0$search_stuff\""; |