From c1cb7ba47f57c63d037508747e684b9193ea07e1 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Fri, 4 Jan 2002 11:52:26 +0000 Subject: [PATCH] Small optimization and fixed None folder bug. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2089 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/search.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/search.php b/src/search.php index eddf8ae3..14de0d86 100644 --- a/src/search.php +++ b/src/search.php @@ -24,8 +24,14 @@ function s_opt( $val, $sel, $tit ) { /* ------------------------ main ------------------------ */ -displayPageHeader($color, $mailbox); $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); +$boxes = sqimap_mailbox_list($imapConnection); + +if( $mailbox == 'None' ) { + $mailbox = $boxes[0]['unformatted']; +} + +displayPageHeader($color, $mailbox); if( !isset( $search_memory ) ) { $search_memory = 0; @@ -63,8 +69,6 @@ for ( $form = 0; $form <= $search_memory; $form++ ) { " \n". '