Changeset 1f020b5 in github
- Timestamp:
- Jan 31, 2008 9:34:50 AM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 9ac70f0
- Parents:
- 39fd695
- Files:
-
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (3 diffs)
-
program/steps/mail/func.inc (modified) (1 diff)
-
program/steps/mail/search.inc (modified) (1 diff)
-
program/steps/mail/show.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rd4cbfab r1f020b5 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2008/01/31 (robin) 5 - Remember search results (closes #1483883), patch by the_glu 3 6 4 7 2008/01/08 (tomekp) -
program/js/app.js
r4315b00 r1f020b5 150 150 // enable mail commands 151 151 this.enable_command('list', 'checkmail', 'compose', 'add-contact', 'search', 'reset-search', true); 152 153 if (this.env.search_text != null && document.getElementById('quicksearchbox') != null) 154 document.getElementById('quicksearchbox').value = this.env.search_text; 152 155 153 156 if (this.env.action=='show' || this.env.action=='preview') … … 498 501 if (this.task=='mail') 499 502 { 500 if (this.env.search_request<0 || ( this.env.search_request && props != this.env.mailbox))503 if (this.env.search_request<0 || (props != '' && (this.env.search_request && props != this.env.mailbox))) 501 504 this.reset_qsearch(); 502 505 … … 1200 1203 add_url = '&_safe=1'; 1201 1204 1205 // also send search request to get the right messages 1206 if (this.env.search_request) 1207 add_url += '&_search='+this.env.search_request; 1208 1202 1209 if (id) 1203 1210 { -
program/steps/mail/func.inc
rfba1f5a r1f020b5 49 49 // set message set for search result 50 50 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) 51 { 51 52 $IMAP->set_search_set($_SESSION['search'][$_REQUEST['_search']]); 53 $OUTPUT->set_env('search_request', $_REQUEST['_search']); 54 $OUTPUT->set_env('search_text', $_SESSION['last_text_search']); 55 } 52 56 53 57 -
program/steps/mail/search.inc
re4867ea r1f020b5 90 90 { 91 91 $_SESSION['search'][$search_request] = $IMAP->get_search_set(); 92 $_SESSION['last_text_search'] = $str; 92 93 rcmail_js_message_list($result_h); 93 94 $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $count)); -
program/steps/mail/show.inc
r7db228a r1f020b5 81 81 } 82 82 83 $next = $prev = -1; 83 // set message set for search result 84 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 90 $next = $prev = $first = $last = -1; 84 91 // get previous, first, next and last message UID 85 if (!($_SESSION['sort_col'] == 'date' && $_SESSION['sort_order'] == 'DESC') && 86 $IMAP->get_capability('sort')) 92 if ((!($_SESSION['sort_col'] == 'date' && $_SESSION['sort_order'] == 'DESC') && 93 $IMAP->get_capability('sort') ) && !(!empty($_REQUEST['_search']) && 94 isset($_SESSION['search'][$_REQUEST['_search']])) ) 87 95 { 88 96 // Only if we use custom sorting … … 94 102 $next = isset($a_msg_index[$MESSAGE['index']+1]) ? $a_msg_index[$MESSAGE['index']+1] : -1 ; 95 103 $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; 96 121 } 97 122 else
Note: See TracChangeset
for help on using the changeset viewer.
