summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-16 07:53:53 +0000
committeralecpl <alec@alec.pl>2008-11-16 07:53:53 +0000
commitf1d020838063880f3cda56589550227d776c49ba (patch)
tree00210640f15b14c096ddd7aef0a746367ba19e4e
parent250d3f76cc754a09e8d57b4b83dc7d9fb189225e (diff)
- use memory less expensive method of searching when result is bigger than page size
-rw-r--r--program/include/rcube_imap.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 7e2221884..9b507028c 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -674,7 +674,7 @@ class rcube_imap
}
else { // SEARCH searching result, need sorting
$cnt = count($msgs);
- if ($cnt > 300) { // experimantal best result
+ if ($cnt > 300 && $cnt > $this->page_size) { // experimantal value for best result
// use memory less expensive (and quick) method for big result set
$a_index = $this->message_index($mailbox, $this->sort_field, $this->sort_order);
// get messages uids for one page...