Changeset 9424cc7 in github
- Timestamp:
- Nov 15, 2008 10:30:19 AM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 193fb42
- Parents:
- e2e745f
- File:
-
- 1 edited
-
program/include/rcube_imap.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap.php
re2e745f r9424cc7 674 674 } 675 675 else { // SEARCH searching result, need sorting 676 if ($cnt > $this->pagesize * 2) { 676 $cnt = count($msgs); 677 if ($cnt > 300) { // experimantal best result 677 678 // use memory less expensive (and quick) method for big result set 678 679 $a_index = $this->message_index($mailbox, $this->sort_field, $this->sort_order); 679 680 // get messages uids for one page... 680 $msgs = array_slice(array_keys($a_index), $start_msg, min( count($msgs)-$start_msg, $this->page_size));681 $msgs = array_slice(array_keys($a_index), $start_msg, min($cnt-$start_msg, $this->page_size)); 681 682 // ...and fetch headers 682 683 $this->_fetch_headers($mailbox, join(',', $msgs), $a_msg_headers, NULL); … … 704 705 705 706 // only return the requested part of the set 706 return array_slice(array_values($a_msg_headers), $start_msg, min( count($msgs)-$start_msg, $this->page_size));707 return array_slice(array_values($a_msg_headers), $start_msg, min($cnt-$start_msg, $this->page_size)); 707 708 } 708 709 }
Note: See TracChangeset
for help on using the changeset viewer.
