Changeset df0da2e0 in github
- Timestamp:
- Feb 2, 2008 2:41:32 PM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- adc3e41
- Parents:
- 39508cb
- Location:
- program
- Files:
-
- 2 edited
-
include/rcube_imap.inc (modified) (1 diff)
-
steps/mail/show.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap.inc
rfa0152c rdf0da2e0 762 762 763 763 $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; 764 $key = "$mbox:".$this->sort_field.":".$this->sort_order.".msgi"; 764 $key = "{$mailbox}:{$this->sort_field}:{$this->sort_order}:{$this->search_string}.msgi"; 765 766 // we have a saved search result. get index from there 767 if (!isset($this->cache[$key]) && $this->search_string && $mailbox == $this->mailbox) 768 { 769 $this->cache[$key] = $a_msg_headers = array(); 770 $this->_fetch_headers($mailbox, join(',', $this->search_set), $a_msg_headers, NULL); 771 772 foreach (iil_SortHeaders($a_msg_headers, $this->sort_field, $this->sort_order) as $i => $msg) 773 $this->cache[$key][] = $msg->uid; 774 } 765 775 766 776 // have stored it in RAM -
program/steps/mail/show.inc
r1f020b5 rdf0da2e0 75 75 76 76 // check for unset disposition notification 77 if ($MESSAGE['headers']->mdn_to && !$MESSAGE['headers']->mdn_sent )77 if ($MESSAGE['headers']->mdn_to && !$MESSAGE['headers']->mdn_sent && $IMAP->get_mailbox_name() != $CONFIG['drafts_mbox']) 78 78 { 79 79 rcube_add_label('mdnrequest'); … … 81 81 } 82 82 83 // set message set for search result84 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))85 {86 $IMAP->set_search_set($_SESSION['search'][$_REQUEST['_search']]);87 $OUTPUT->set_env('search_request', $_REQUEST['_search']);88 }89 83 90 84 $next = $prev = $first = $last = -1; 91 85 // get previous, first, next and last message UID 92 86 if ((!($_SESSION['sort_col'] == 'date' && $_SESSION['sort_order'] == 'DESC') && 93 $IMAP->get_capability('sort') ) && !(!empty($_REQUEST['_search']) && 94 isset($_SESSION['search'][$_REQUEST['_search']])) ) 87 $IMAP->get_capability('sort')) || !empty($_REQUEST['_search'])) 95 88 { 96 89 // Only if we use custom sorting … … 102 95 $next = isset($a_msg_index[$MESSAGE['index']+1]) ? $a_msg_index[$MESSAGE['index']+1] : -1 ; 103 96 $last = count($a_msg_index)>0 ? $a_msg_index[count($a_msg_index)-1] : -1; 104 }105 elseif (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))106 {107 $search_data = $_SESSION['search'][$_REQUEST['_search']];108 $result = $IMAP->search(NULL, $search_data[0], $search_data[1],$search_data[3]);109 $result = array_reverse($result);110 foreach ($result as $key=>$rid)111 {112 $result[$key] = $IMAP->get_uid($rid);113 if ($MESSAGE['UID'] == $result[$key])114 $seq = $key;115 }116 $prev = isset($result[$seq-1]) ? $result[$seq-1] : -1 ;117 $first = count($result)>0 ? $result[0] : -1;118 $next = isset($result[$seq+1]) ? $result[$seq+1] : -1 ;119 $last = count($result)>0 ? $result[count($result)-1] : -1;120 $MESSAGE['index'] = $seq;121 97 } 122 98 else
Note: See TracChangeset
for help on using the changeset viewer.
