diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 08:44:48 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 08:44:48 +0000 |
| commit | 4966fc7f22a28e2eb0de256bb44613f0e580a111 (patch) | |
| tree | 948d12df5b2904dd14c71f51697f15023d40b91d /roundcubemail/program/steps/mail/search.inc | |
| parent | d3ca1ce0983024613e1b639ffdb396f6099e6a69 (diff) | |
- Fixed issues with big memory allocation of IMAP results, improved a lot of rcube_imap class
git-svn-id: https://svn.roundcube.net/trunk@5557 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/search.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/search.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/search.inc b/roundcubemail/program/steps/mail/search.inc index 49f31e0c1..05ba9d23e 100644 --- a/roundcubemail/program/steps/mail/search.inc +++ b/roundcubemail/program/steps/mail/search.inc @@ -109,10 +109,6 @@ $search_str = trim($search_str); if ($search_str) $IMAP->search($mbox, $search_str, $imap_charset, $_SESSION['sort_col']); -// Get the headers -$result_h = $IMAP->list_headers($mbox, 1, $_SESSION['sort_col'], $_SESSION['sort_order']); -$count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); - // save search results in session if (!is_array($_SESSION['search'])) $_SESSION['search'] = array(); @@ -123,6 +119,12 @@ if ($search_str) { } $_SESSION['search_request'] = $search_request; + +// Get the headers +$result_h = $IMAP->list_headers($mbox, 1, $_SESSION['sort_col'], $_SESSION['sort_order']); +$count = $IMAP->messagecount($mbox, $IMAP->threading ? 'THREADS' : 'ALL'); + + // Make sure we got the headers if (!empty($result_h)) { rcmail_js_message_list($result_h); |
