major speed improvements
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 25 Mar 2000 12:12:43 +0000 (12:12 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 25 Mar 2000 12:12:43 +0000 (12:12 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@341 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php
functions/imap_mailbox.php
src/folders.php

index a8cde1dd08a4ee44346a5985dcb2fb4b014bd49a..9bfc1a46885dd299376d6170efb5f5c1576aff40 100755 (executable)
     **  Returns the delimeter between mailboxes:  INBOX/Test, or INBOX.Test... 
     ******************************************************************************/
    function sqimap_get_delimiter ($imap_stream) {
-      fputs ($imap_stream, ". LIST \"\" *\r\n");
+      fputs ($imap_stream, ". LSUB \"\" *\r\n");
       $read = sqimap_read_data($imap_stream, ".", true, $a, $b);
       $quote_position = strpos ($read[0], "\"");
       $delim = substr ($read[0], $quote_position+1, 1);
index 8d2dc88c36ac51148ef47a55d0ea96083b8afddd..997d65726144adbc27d9339f8c97652a85b5f84d 100755 (executable)
       
       $dm = sqimap_get_delimiter ($imap_stream);
 
-      fputs ($imap_stream, "a001 LIST \"\" *\r\n");
+      fputs ($imap_stream, "a001 LIST \"INBOX\" *\r\n");
       $read_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
       $g = 0;
       $phase = "inbox"; 
index 069857b53495f87c30f5b280f89634717895db9c..44b6073c00d87974a5bdf934286dd873073a1b36 100644 (file)
       $boxes = sqimap_mailbox_list_all ($imap_stream);
       
       echo "<FORM ACTION=\"folders_subscribe.php?method=sub\" METHOD=POST>\n";
-      echo "<TT><SELECT NAME=mailbox>\n";
-      for ($i = 0; $i < count($boxes); $i++) {
-         $use_folder = true;
-         for ($p = 0; $p < count($special_folders); $p++) {
-            if ($boxes[$i]["unformatted"] == $special_folders[$p]) {
-               $use_folder = false;
-            } else if (substr($boxes[$i]["unformatted"], 0, strlen($trash_folder)) == $trash_folder) {
-               $use_folder = false;
-            }
-
-            for ($q = 0; $q < count($boxes_sub); $q++) {
-               if ($boxes[$i]["unformatted"] == $boxes_sub[$q]["unformatted"]) 
-                  $use_folder = false;
-            }
-         }
-         if ($use_folder == true) {
-            $box = $boxes[$i]["unformatted-dm"];
-            $box2 = replace_spaces($boxes[$i]["formatted"]);
-            echo "         <OPTION VALUE=\"$box\">$box2\n";
-         }
-      }
-      echo "</SELECT></TT>\n";
+      echo "<tt><input type=text size=32 name=mailbox></tt>";
       echo "<INPUT TYPE=SUBMIT VALUE=\"";
       echo _("Subscribe");
       echo "\">\n";