diff options
author | alecpl <alec@alec.pl> | 2010-10-25 12:39:36 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-10-25 12:39:36 +0000 |
commit | a5a4bf46bd2e579e828989563c120f9ab2b28a32 (patch) | |
tree | e684ab8a9fcdf3f63564f52c2beecd83368ddf68 /program/include/main.inc | |
parent | 10f08e6ce02dc81dd2baa18cbe135f7352d370f4 (diff) |
- Add basic IMAP LIST's \Noselect option support (mark unselectable folders as virtual, etc.)
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 46e45f7cb..7e96233bc 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1332,6 +1332,8 @@ function rcmail_mailbox_select($p = array()) */ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='') { + global $RCMAIL; + $pos = strpos($folder, $delm); if ($pos !== false) { @@ -1354,6 +1356,12 @@ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='') $path .= $currentFolder; + // Check \Noselect option + if (!$virtual) { + $opts = $RCMAIL->imap->mailbox_options($path); + $virtual = in_array('\\Noselect', $opts); + } + if (!isset($arrFolders[$currentFolder])) { $arrFolders[$currentFolder] = array( 'id' => $path, |