From 12d6143963bba142a9cfb97b52f042c9a115bcc0 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sat, 21 Apr 2001 13:28:11 +0000 Subject: [PATCH] fixed bug that didn't display folders with spaces in the name git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1279 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + functions/imap_mailbox.php | 14 ++++++-------- src/left_main.php | 18 ++++++++---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7878bda5..c98bd5a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Version 1.1.0 -- DEVELOPMENT ---------------------------- +- Preferences are now cached instead of read in every page load. - Improved URL parser - Added ability to read HTML messages by default instead of plain text (Display Options) - Added authenticated SMTP server support (configure in conf.pl) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index fe1baee5..1a67ae51 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -158,7 +158,6 @@ if (substr($mailbox, -1) == $dm) $mailbox = substr($mailbox, 0, strlen($mailbox) - 1); $boxes[$g]['unformatted'] = $mailbox; - //$boxes[$g]['unformatted-disp'] = ereg_replace('^' . $folder_prefix, '', $mailbox); if (substr($mailbox,0,strlen($folder_prefix))==$folder_prefix) { $boxes[$g]['unformatted-disp'] = substr($mailbox, strlen($folder_prefix)); } else if (strtolower($mailbox) == "inbox") { @@ -171,9 +170,8 @@ $flags = trim(strtolower(str_replace('\\', '',$regs[1]))); if ($flags) { $boxes[$g]['flags'] = explode(' ', $flags); - } - else - $boxes[$g]['flags'] = array(); + } else + $boxes[$g]['flags'] = array(); } return $boxes; @@ -385,10 +383,10 @@ if ($flags) { $boxes[$g]['flags'] = explode(" ", $flags); } - else - { - $boxes[$g]['flags'] = array(); - } + else + { + $boxes[$g]['flags'] = array(); + } } $g++; } diff --git a/src/left_main.php b/src/left_main.php index 2eb3af71..6130bdba 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -93,12 +93,12 @@ $numMessages = sqimap_get_num_messages($imapConnection, $real_box); if ($numMessages > 0) - { + { $urlMailbox = urlencode($real_box); $line .= "\n\n"; $line .= "   ("._("purge").")"; $line .= "\n\n"; - } + } } $line .= ""; return $line; @@ -156,14 +156,12 @@ if (in_array('noselect', $boxes[$i]['flags'])) { $line .= ""; - if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) { - $line .= str_replace(' ', ' ', $regs[1]); - if (isset($boxes[$i]['parent'])) - $line .= FoldLink($boxes[$i]['unformatted'], - $boxes[$i]['parent']); - elseif ($collapse_folders) - $line .= '  '; - $line .= str_replace(' ', ' ', $regs[2]); + if (ereg("^( *)([^ ]*)", $mailbox, $regs)) { + $line .= str_replace(' ', ' ', $mailbox); + //if (isset($boxes[$i]['parent'])) + $line .= FoldLink($boxes[$i]['unformatted'], $boxes[$i]['parent']); + //elseif ($collapse_folders) + // $line .= '  '; } $line .= ''; } else { -- 2.25.1