From d08804fd706e3cea9c3ea9aa9d9901b17dcf6fa9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 5 Mar 2010 09:50:31 -0700 Subject: [PATCH] Remove 'sort_limit' configuration option. This option was meant to work around slowness/inadequacies of c-client. Our Imap_Client library is much faster, so this should not be an issue moving forward (if someone really wants to sort their 1,000,000 message mailbox by thread, I guess that should be their option). --- imp/config/conf.xml | 5 ---- imp/docs/CHANGES | 1 + imp/docs/UPGRADING | 2 +- imp/js/DimpBase.js | 8 +------ imp/js/mailbox.js | 5 ++-- imp/lib/IMP.php | 37 +++++++++--------------------- imp/lib/Mailbox.php | 8 ------- imp/lib/Views/ListMessages.php | 4 ---- imp/mailbox-mimp.php | 17 ++++---------- imp/mailbox.php | 17 +++++--------- imp/templates/mailbox/message_headers.html | 4 ++-- 11 files changed, 29 insertions(+), 79 deletions(-) diff --git a/imp/config/conf.xml b/imp/config/conf.xml index d32932b22..f1b9fc80e 100644 --- a/imp/config/conf.xml +++ b/imp/config/conf.xml @@ -64,11 +64,6 @@ list of folders that can't be modified (deleted, renamed, etc) by the user, e.g.: "Drafts, Trash". (The mailbox value must be encoded in the UTF7-IMAP charset; see RFC 3501 [5.1.3])"/> - 0 $val) { - if ($search_mbox || - $sortpref['limit'] && ($key != 'hdr_arrival')) { - $t->set($key, $val[0]); + $sort_link = $mailbox->copy()->add(array('a' => 'c', 'sb' => $val[1])); + if ($sortpref['by'] == $val[1]) { + $t->set($key, $val[0] . ' ' . ($sortpref['dir'] ? '^' : 'v') . ''); } else { - $sort_link = $mailbox->copy()->add(array('a' => 'c', 'sb' => $val[1])); - if ($sortpref['by'] == $val[1]) { - $t->set($key, $val[0] . ' ' . ($sortpref['dir'] ? '^' : 'v') . ''); - } else { - $t->set($key, '' . $val[0] . ''); - } + $t->set($key, '' . $val[0] . ''); } } /* Add thread header entry. */ -if (!$search_mbox && - !$sortpref['limit'] && - IMP::threadSortAvailable($mailbox)) { +if (!$search_mbox && IMP::threadSortAvailable($mailbox)) { if (is_null($imp_thread)) { $t->set('hdr_subject_minor', $t->get('hdr_thread')); } else { diff --git a/imp/mailbox.php b/imp/mailbox.php index 16f4816e5..cfa5593c7 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -650,15 +650,12 @@ if ($pageOb['msgcount']) { } else { $ptr['change_sort_link'] = null; } - if ($sortpref['limit']) { - $ptr['sortlimit_text'] = Horde::stripAccessKey($val['text']); - } else { - $tmp = ($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url; - $ptr['change_sort'] = addslashes($tmp->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token))); - $ptr['change_sort_widget'] = Horde::widget($tmp->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], 'widget', null, null, $val['text']); - if (!isset($val['extra'])) { - $ptr['extra'] = null; - } + + $tmp = ($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url; + $ptr['change_sort'] = addslashes($tmp->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token))); + $ptr['change_sort_widget'] = Horde::widget($tmp->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], 'widget', null, null, $val['text']); + if (!isset($val['extra'])) { + $ptr['extra'] = null; } } @@ -671,7 +668,6 @@ if ($pageOb['msgcount']) { $mh_template->set('mailbox', htmlspecialchars($imp_mbox['mailbox'])); $mh_template->set('mailbox_token', $mailbox_token); $mh_template->set('sessiontag', Horde_Util::formInput()); - $mh_template->set('sortlimit', $sortpref['limit']); $mh_template->set('headers', $headers); if (!$search_mbox) { @@ -846,7 +842,6 @@ if (($pageOb['end'] - $pageOb['begin']) >= 20) { } Horde::addInlineScript(array( - 'ImpMailbox.sortlimit = ' . intval($sortpref['limit']), 'ImpMailbox.unread = ' . strval($unread) )); diff --git a/imp/templates/mailbox/message_headers.html b/imp/templates/mailbox/message_headers.html index 642413516..cd5c70b28 100644 --- a/imp/templates/mailbox/message_headers.html +++ b/imp/templates/mailbox/message_headers.html @@ -15,8 +15,8 @@ - - + + -- 2.11.0