From: ebullient Date: Thu, 1 May 2003 01:46:57 +0000 (+0000) Subject: Additional tweaks for folder create/rename/delete display and behavior. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=45f836eb023db989c1f0ed8900550d4ccc9d8ed9;p=squirrelmail.git Additional tweaks for folder create/rename/delete display and behavior. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4838 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 3a17cd66..a2580f4b 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -421,11 +421,15 @@ function user_strcasecmp($a, $b) { * you know these options will be shown 3 times in a row.. (most often unset). * $parent - used to indicate whether or not listed boxes can be parents */ -function sqimap_mailbox_option_list($imap_stream, $show_selected = 0, $folder_skip = 0, $boxes = 0, $parent = false) { +function sqimap_mailbox_option_list($imap_stream, $show_selected = 0, $folder_skip = 0, $boxes = 0, $parent = false, $use_long_format = false ) { global $username, $data_dir; $mbox_options = ''; - $shorten_box_names = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_OFF); + if ( $use_long_format ) { + $shorten_box_names = 0; + } else { + $shorten_box_names = getPref($data_dir, $username, 'mailbox_select_style', SMPREF_OFF); + } if ($boxes == 0) { $boxes = sqimap_mailbox_list($imap_stream); diff --git a/src/folders.php b/src/folders.php index 63b4ac22..6b436539 100644 --- a/src/folders.php +++ b/src/folders.php @@ -101,12 +101,11 @@ echo html_tag( 'table', '', 'center', '', 'width="70%" cellpadding="4" cellspaci '
'. "\n"; if ($show_contain_subfolders_option) { @@ -142,26 +141,33 @@ echo html_tag( 'tr', $count_special_folders = 0; $num_max = 1; if (strtolower($imap_server_type) == "courier" || $move_to_trash) { - $num_max++; + $num_max++; } if ($move_to_sent) { - $num_max++; + $num_max++; } if ($save_as_draft) { - $num_max++; + $num_max++; } for ($p = 0, $cnt = count($boxes); $p < $cnt && $count_special_folders < $num_max; $p++) { if (strtolower($boxes[$p]['unformatted']) == 'inbox') $count_special_folders++; else if (strtolower($imap_server_type) == 'courier' && - strtolower($boxes[$p]['unformatted']) == 'inbox.trash') + strtolower($boxes[$p]['unformatted']) == 'inbox.trash') { $count_special_folders++; - else if ($boxes[$p]['unformatted'] == $trash_folder && $trash_folder) + } + else if ($boxes[$p]['unformatted'] == $trash_folder && $trash_folder) { $count_special_folders++; - else if ($boxes[$p]['unformatted'] == $sent_folder && $sent_folder) + array_push($skip_folders, strtolower($trash_folder)); + } + else if ($boxes[$p]['unformatted'] == $sent_folder && $sent_folder) { $count_special_folders++; - else if ($boxes[$p]['unformatted'] == $draft_folder && $draft_folder) + array_push($skip_folders, strtolower($sent_folder)); + } + else if ($boxes[$p]['unformatted'] == $draft_folder && $draft_folder) { $count_special_folders++; + array_push($skip_folders, strtolower($draft_folder)); + } } @@ -177,7 +183,7 @@ if ($count_special_folders < count($boxes)) { . "\n". "\n" . '