diff options
author | alecpl <alec@alec.pl> | 2011-01-04 11:16:54 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-01-04 11:16:54 +0000 |
commit | 600bb156f79908e0ca72a039c6ad290146a2eb4e (patch) | |
tree | 903b2d054b14b7789241638ba2132fb66eac82b9 /program/steps | |
parent | eabd44876c67239b1f27afc4acadf1d7e2001219 (diff) |
- Use improved get_capability() syntax, saves CAPABILITY call in some cases
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/func.inc | 8 | ||||
-rw-r--r-- | program/steps/settings/edit_folder.inc | 4 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 8 |
3 files changed, 6 insertions, 14 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index d4e250b03..abf112212 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -102,14 +102,10 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') { // set current mailbox and some other vars in client environment $OUTPUT->set_env('mailbox', $mbox_name); $OUTPUT->set_env('pagesize', $IMAP->page_size); - $OUTPUT->set_env('quota', $IMAP->get_capability('quota')); + $OUTPUT->set_env('quota', $IMAP->get_capability('QUOTA')); $OUTPUT->set_env('delimiter', $IMAP->get_hierarchy_delimiter()); $OUTPUT->set_env('threading', (bool) $IMAP->threading); - $OUTPUT->set_env('threads', $IMAP->threading - || $IMAP->get_capability('thread=references') - || $IMAP->get_capability('thread=orderedsubject') - || $IMAP->get_capability('thread=refs') - ); + $OUTPUT->set_env('threads', $IMAP->threading || $IMAP->get_capability('THREAD')); if ($CONFIG['flag_for_deletion']) $OUTPUT->set_env('flag_for_deletion', true); diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc index ca07b04bc..2842b356d 100644 --- a/program/steps/settings/edit_folder.inc +++ b/program/steps/settings/edit_folder.inc @@ -39,9 +39,7 @@ function rcube_folder_form($attrib) $delimiter = $RCMAIL->imap->get_hierarchy_delimiter(); $special = (strlen($mbox_imap) && in_array($mbox_imap, (array) $RCMAIL->config->get('default_imap_folders'))); $protected = ($special && $RCMAIL->config->get('protect_default_folders')); - $threading_supported = $RCMAIL->imap->get_capability('thread=references') - || $RCMAIL->imap->get_capability('thread=orderedsubject') - || $RCMAIL->imap->get_capability('thread=refs'); + $threading_supported = $RCMAIL->imap->get_capability('THREAD'); // Get mailbox stats (messages count, etc.), mailbox name and parent if (strlen($mbox)) { diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index daa9fafa6..fb48e926b 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -334,9 +334,7 @@ function rcmail_user_prefs($current=null) } $RCMAIL->imap_connect(); - $threading_supported = $RCMAIL->imap->get_capability('thread=references') - || $RCMAIL->imap->get_capability('thread=orderedsubject') - || $RCMAIL->imap->get_capability('thread=refs'); + $threading_supported = $RCMAIL->imap->get_capability('THREAD'); if (!isset($no_override['autoexpand_threads']) && $threading_supported) { $field_id = 'rcmfd_autoexpand_threads'; @@ -346,8 +344,8 @@ function rcmail_user_prefs($current=null) $select_autoexpand_threads->add(rcube_label('expand_only_unread'), 2); $blocks['main']['options']['autoexpand_threads'] = array( - 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))), - 'content' => $select_autoexpand_threads->show($config['autoexpand_threads']), + 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))), + 'content' => $select_autoexpand_threads->show($config['autoexpand_threads']), ); } |