summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-10-13 19:15:51 +0000
committeralecpl <alec@alec.pl>2010-10-13 19:15:51 +0000
commitf6aac389bfc29e0f6d1f2d43aa900a2ba017bc2f (patch)
treed9c57cca7f4f110c96a16063b7000bceac77a5cf /program/steps/mail/search.inc
parentad334a12579f21e4e04a47e257b9d0ac71d50b98 (diff)
- Minimize session data size by storing only last search result
and by removing search result from session after listing with empty search filter
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 1fc74dfe5..db46ce428 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -111,19 +111,18 @@ if (!is_array($_SESSION['search']))
$_SESSION['search'] = array();
if ($search_str) {
- $_SESSION['search'][$search_request] = $IMAP->get_search_set();
+ $_SESSION['search'] = $IMAP->get_search_set();
$_SESSION['last_text_search'] = $str;
}
+$_SESSION['search_request'] = $search_request;
// Make sure we got the headers
-if (!empty($result_h))
-{
+if (!empty($result_h)) {
rcmail_js_message_list($result_h);
if ($search_str)
$OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $IMAP->messagecount(NULL, 'ALL')));
}
-else
-{
+else {
$OUTPUT->show_message('searchnomatch', 'notice');
}