fixed bug that didn't display folders with spaces in the name
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 21 Apr 2001 13:28:11 +0000 (13:28 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 21 Apr 2001 13:28:11 +0000 (13:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1279 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/imap_mailbox.php
src/left_main.php

index 7878bda..c98bd5a 100644 (file)
--- 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)
index fe1baee..1a67ae5 100755 (executable)
          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") {
          $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;
             if ($flags) {
                $boxes[$g]['flags'] = explode(" ", $flags);
             }
-           else
-           {
-              $boxes[$g]['flags'] = array();
-           }
+            else
+            {
+               $boxes[$g]['flags'] = array();
+            }
          }
          $g++;
       }
index 2eb3af7..6130bdb 100644 (file)
             $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
 
          if ($numMessages > 0)
-        {
+         {
             $urlMailbox = urlencode($real_box);
             $line .= "\n<small>\n";
             $line .= " &nbsp; (<B><A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A></B>)";
             $line .= "\n</small>\n";
-        }
+         }
       }
       $line .= "</NOBR>";
       return $line;
 
          if (in_array('noselect', $boxes[$i]['flags'])) {
             $line .= "<FONT COLOR=\"$color[10]\">";
-            if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) {
-                $line .= str_replace(' ', '&nbsp;', $regs[1]);
-                if (isset($boxes[$i]['parent']))
-                    $line .= FoldLink($boxes[$i]['unformatted'], 
-                        $boxes[$i]['parent']);
-                elseif ($collapse_folders)
-                    $line .= '<tt>&nbsp;</tt>&nbsp;';
-                $line .= str_replace(' ', '&nbsp;', $regs[2]);
+            if (ereg("^( *)([^ ]*)", $mailbox, $regs)) {
+                $line .= str_replace(' ', '&nbsp;', $mailbox);
+                //if (isset($boxes[$i]['parent']))
+                    $line .= FoldLink($boxes[$i]['unformatted'], $boxes[$i]['parent']);
+                //elseif ($collapse_folders)
+                //    $line .= '<tt>&nbsp;</tt>&nbsp;';
             }
             $line .= '</FONT>';
          } else {