From: Alex L. <ale...@us...> - 2003-07-04 22:06:16
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1:/tmp/cvs-serv14488 Modified Files: imap_mailbox.php Log Message: fix mailbox list (noselect and array_values) Index: imap_mailbox.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_mailbox.php,v retrieving revision 1.194 retrieving revision 1.195 diff -u -w -r1.194 -r1.195 --- imap_mailbox.php 3 Jul 2003 11:45:02 -0000 1.194 +++ imap_mailbox.php 4 Jul 2003 22:06:13 -0000 1.195 @@ -538,8 +538,8 @@ $inbox_subscribed = true; } } - /* remove duplicates */ - $sorted_lsub_ary = array_unique($sorted_lsub_ary); + /* remove duplicates and ensure array is contiguous, so we don't rely on sort()' side-effect that fails if count()==1 */ + $sorted_lsub_ary = array_values(array_unique($sorted_lsub_ary)); /* natural sort mailboxes */ if (isset($sorted_lsub_ary)) { @@ -718,6 +718,7 @@ $inbox_in_list = false; $inbox_subscribed = false; + $noselect = false; require_once(SM_PATH . 'include/load_prefs.php'); |