- Add possibility (for plugins) to filter folders lists by some additional criteria (e.g. folder type)

This commit is contained in:
alecpl
2011-05-06 08:14:48 +00:00
parent de0a3f9b9f
commit 94bdcce081
8 changed files with 71 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ $check_all = !empty($_GET['_refresh']) || (bool)$RCMAIL->config->get('check_all_
// list of folders to check
if ($check_all) {
$a_mailboxes = $IMAP->list_mailboxes();
$a_mailboxes = $IMAP->list_mailboxes('', '*', 'mail');
}
else {
$a_mailboxes = (array) $current;

View File

@@ -1297,7 +1297,10 @@ function rcmail_editor_selector($attrib)
function rcmail_store_target_selection($attrib)
{
$attrib['name'] = '_store_target';
$select = rcmail_mailbox_select(array_merge($attrib, array('noselection' => '- '.rcube_label('dontsave').' -')));
$select = rcmail_mailbox_select(array_merge($attrib, array(
'noselection' => '- '.rcube_label('dontsave').' -',
'folder_filter' => 'mail'
)));
return $select->show($_SESSION['compose']['param']['sent_mbox'], $attrib);
}

View File

@@ -19,7 +19,7 @@
*/
$a_folders = $IMAP->list_mailboxes();
$a_folders = $IMAP->list_mailboxes('', '*', 'mail');
if (!empty($a_folders))
{