From 591000ec59a6ae1088df08a48e65bb6652fc63a7 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 4 May 2000 20:59:39 +0000 Subject: [PATCH] fixed problem with usort getting bad data in some instances git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@489 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 11 +++++------ functions/imap_mailbox.php | 11 +++++++++-- functions/mailbox_display.php | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 8d79287..7a32152 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -1091,12 +1091,11 @@ sub command61 { } sub command62 { - print "Although our project goals stated that we would stay 100% HTML with\n"; - print "no javascript, some of our developers have developed a wonderful\n"; - print "javascript interface for searching for email addresses in your address\n"; - print "books. In order to stick with our project goals, and without having\n"; - print "to refuse their work, we also developed an HTML version of address\n"; - print "book searching.\n"; + print "Some of our developers have come up with very good javascript interface\n"; + print "for searching through address books, however, our original goals said\n"; + print "that we would be 100% HTML. In order to make it possible to use their\n"; + print "interface, and yet stick with our goals, we have also written a plain\n"; + print "HTML version of the search. Here, you can choose which version to use.\n"; print "\n"; print "This is just the default value. It is also a user option that each\n"; print "user can configure individually\n"; diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 4cf6e3a..39e17d9 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -173,7 +173,12 @@ if ($inbox_subscribed == false || $inbox_in_list == false) { fputs ($imap_stream, "a001 LIST \"\" \"INBOX\"\r\n"); $inbox_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message); - $sorted_list_ary[count($sorted_list_ary)] = $inbox_ary[0]; + + $pos = count($sorted_list_ary); + $sorted_list_ary[$pos] = $inbox_ary[0]; + + $pos = count($sorted_lsub_ary); + $sorted_lsub_ary[$pos] = find_mailbox_name($inbox_ary[0]); } $boxes = sqimap_mailbox_parse ($sorted_list_ary, $sorted_lsub_ary, $dm); @@ -267,7 +272,9 @@ } $g++; } - $boxes = ary_sort ($boxes, "unformatted", 1); + if ($boxes) { + $boxes = ary_sort ($boxes, "unformatted", 1); + } return $boxes; } diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index c5b304b..8ffb15e 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -296,5 +296,6 @@ echo "" . _("Next") . "\n"; } echo ""; /** End of message-list table */ + } ?> -- 1.9.1