From d17145d9db9c267dc2ec9975f9ba8adfa2a11965 Mon Sep 17 00:00:00 2001 From: fallas Date: Sun, 28 Oct 2001 11:00:00 +0000 Subject: [PATCH] Added the drafts folder as a special folder. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1631 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/left_main.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/left_main.php b/src/left_main.php index 50155aa2..194271f3 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -38,7 +38,14 @@ } else if (! sqimap_mailbox_is_subscribed($imapConnection, $trash_folder)) { sqimap_subscribe($imapConnection, $trash_folder); } - } + if (isset ($draft_folder) && $draft_folder != 'none') { + if (!sqimap_mailbox_exists ($imapConnection, $draft_folder)) { + sqimap_mailbox_create ($imapConnection, $draft_folder, ''); + } else if (! sqimap_mailbox_is_subscribed($imapConnection, $draft_folder)) { + sqimap_subscribe($imapConnection, $draft_folder); + } + } + } $auto_create_done = true; session_register('auto_create_done'); } @@ -47,6 +54,7 @@ global $folder_prefix, $trash_folder, $sent_folder; global $color, $move_to_sent, $move_to_trash; global $unseen_notify, $unseen_type, $collapse_folders; + global $draft_folder, $save_as_draft; $real_box = $box_array['unformatted']; $mailbox = str_replace(' ','',$box_array['formatted']); @@ -76,7 +84,8 @@ if ((strtolower($real_box) == 'inbox') || (($real_box == $trash_folder) && ($move_to_trash)) || (($real_box == $sent_folder) && ($move_to_sent))) - $special_color = true; + (($real_box == $draft_folder) && ($save_as_draft))) + $special_color = true; /* Start off with a blank line. */ $line = ''; -- 2.25.1