summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-10 07:02:45 +0000
committeralecpl <alec@alec.pl>2012-04-10 07:02:45 +0000
commita274fb2e20215716389ec3709f0726b7002521f3 (patch)
tree12b6f946f0ac6da8c3d11659dfcda22d953b1a25 /program
parenta945da6171c00c132cbfdd8420c3aff978e2c40a (diff)
- Fix so "Back" from compose/show doesn't reset search request (#1488238)
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js6
-rw-r--r--program/steps/mail/compose.inc6
2 files changed, 10 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 30333d89b..025a366f1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -569,7 +569,8 @@ function rcube_webmail()
break;
case 'list':
- this.reset_qsearch();
+ if (props && props != '')
+ this.reset_qsearch();
if (this.task == 'mail') {
this.list_mailbox(props);
this.set_button_titles();
@@ -857,6 +858,9 @@ function rcube_webmail()
url += '&_mbox='+urlencode(this.env.mailbox);
if (props)
url += '&_to='+urlencode(props);
+ // also send search request so we can go back to search result after message is sent
+ if (this.env.search_request)
+ url += '&_search='+this.env.search_request;
}
// modify url if we're in addressbook
else if (this.task == 'addressbook') {
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 9475f34c5..ebf79be4e 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -118,7 +118,11 @@ if (!is_array($COMPOSE))
}
// redirect to a unique URL with all parameters stored in session
- $OUTPUT->redirect(array('_action' => 'compose', '_id' => $COMPOSE['id']));
+ $OUTPUT->redirect(array(
+ '_action' => 'compose',
+ '_id' => $COMPOSE['id'],
+ '_search' => $_REQUEST['_search'],
+ ));
}