[dev] [imp-patch] default mailbox for create folder

Francois Marier francois at nit.ca
Tue Aug 3 19:32:09 PDT 2004


I noticed that when creating a folder on my imap server, I couldn't do
it below the INBOX level.  Since everything has to go in there, it can
be safely assumed that if users don't select it before selecting
"Create folder" in the drop down menu, then they want to have the new
folder show up under INBOX (instead of getting a cryptic error
message).

This patch prefixes new folders with "INBOX." if necessary.

Francois
-------------- next part --------------
diff -rpuN -X ../ignorelist ../build/imp/folders.php imp/folders.php
--- ../build/imp/folders.php	Tue May 25 11:52:41 2004
+++ imp/folders.php	Tue Aug  3 22:15:28 2004
@@ -157,6 +157,8 @@ case 'create_folder':
             $new_mailbox = $folder_list[0] . $imp['delimiter'] . $new_mailbox;
         } elseif (!empty($imp['folders'])) {
             $new_mailbox = $imp['folders'] . $new_mailbox;
+        } else {
+            $new_mailbox = 'INBOX' . $imp['delimiter'] . $new_mailbox;
         }
 
         $imp_folder->create($imp['stream'], $new_mailbox, $subscribe);


More information about the dev mailing list