diff options
author | alecpl <alec@alec.pl> | 2009-09-23 12:32:09 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-09-23 12:32:09 +0000 |
commit | 1cead0cbf40468233f1f644ee6bf11835c74737a (patch) | |
tree | d62d415cd7daf6abdc00a320f429826bd563d706 /program/steps | |
parent | ddc891db460ddabef3194f57177b4f9fb182210e (diff) |
- sorting by message index - added 'index_sort' option (#1485936)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/list.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/edit_prefs.inc | 11 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index 57bb91979..cd1a3142d 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -49,12 +49,10 @@ $mbox_name = $IMAP->get_mailbox_name(); if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { $search_request = md5($mbox_name.$_SESSION['search_filter']); - $IMAP->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col); $_SESSION['search'][$search_request] = $IMAP->get_search_set(); $OUTPUT->set_env('search_request', $search_request); } - // fetch message headers if ($count = $IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh']))) diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc index 9fcbc426b..38343b55f 100644 --- a/program/steps/settings/edit_prefs.inc +++ b/program/steps/settings/edit_prefs.inc @@ -162,6 +162,17 @@ function rcmail_user_prefs_block($part, $attrib) ); } + // Show checkbox for toggling 'index_sort' + if (!isset($no_override['index_sort'])) { + $field_id = 'rcmfd_indexsort'; + $input_indexsort = new html_checkbox(array('name' => '_index_sort', 'id' => $field_id, 'value' => 1)); + + $blocks['list']['options']['index_sort'] = array( + 'title' => html::label($field_id, Q(rcube_label('indexsort'))), + 'content' => $input_indexsort->show($config['index_sort']?1:0), + ); + } + // show drop-down for available skins if (!isset($no_override['skin'])) { $skins = rcmail_get_skins(); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 48f6ef7ef..ddb1367c8 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -32,6 +32,7 @@ switch ($CURR_SECTION) 'timezone' => isset($_POST['_timezone']) ? (is_numeric($_POST['_timezone']) ? floatval($_POST['_timezone']) : get_input_value('_timezone', RCUBE_INPUT_POST)) : $CONFIG['timezone'], 'dst_active' => isset($_POST['_dst_active']) ? TRUE : FALSE, 'pagesize' => is_numeric($_POST['_pagesize']) ? max(2, intval($_POST['_pagesize'])) : $CONFIG['pagesize'], + 'index_sort' => isset($_POST['_index_sort']) ? TRUE : FALSE, 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'], ); |