diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-25 12:39:36 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-25 12:39:36 +0000 |
| commit | 19fb45036c83a3feb7efa642181e7c96492f97e4 (patch) | |
| tree | ffdb7202c6c7df5cb1e433ff43b4d71fe0e8cfdd /roundcubemail/program/include/main.inc | |
| parent | 5183429dba1bf65d2391678fd5c6f3f2a2875648 (diff) | |
- Add basic IMAP LIST's \Noselect option support (mark unselectable folders as virtual, etc.)
git-svn-id: https://svn.roundcube.net/trunk@4132 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 46e45f7cb..7e96233bc 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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, |
