summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-28 17:36:26 +0000
committeralecpl <alec@alec.pl>2010-06-28 17:36:26 +0000
commitbdb13a51f735623146f1ac81d9323e5182f99511 (patch)
tree69edc31327831d2028cb827a15748f1c0b4a5ef1 /program
parent60527660ee5e78df7ac4ee8e37a8ba6fdab22128 (diff)
- Fix RC forgets search results (#1483883)
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js4
-rw-r--r--program/steps/addressbook/search.inc2
-rw-r--r--program/steps/mail/search.inc2
3 files changed, 4 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index d0b3bd0ca..4c0e1841f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -487,7 +487,7 @@ function rcube_webmail()
// misc list commands
case 'list':
if (this.task=='mail') {
- if (this.env.search_request<0 || (props != '' && (this.env.search_request && props != this.env.mailbox)))
+ if (!this.env.search_request || (props && props != this.env.mailbox))
this.reset_qsearch();
this.list_mailbox(props);
@@ -496,7 +496,7 @@ function rcube_webmail()
this.set_alttext('delete', this.env.mailbox != this.env.trash_mailbox ? 'movemessagetotrash' : 'deletemessage');
}
else if (this.task=='addressbook') {
- if (this.env.search_request<0 || (this.env.search_request && props != this.env.source))
+ if (!this.env.search_request || (props != this.env.source))
this.reset_qsearch();
this.list_contacts(props);
diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc
index e5ace2451..d23bf5dac 100644
--- a/program/steps/addressbook/search.inc
+++ b/program/steps/addressbook/search.inc
@@ -39,7 +39,7 @@ if ($result->count > 0)
else
{
$OUTPUT->show_message('nocontactsfound', 'warning');
- $search_request = -1;
+ $search_request = null;
}
// update message count display
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index e512e79b3..1fc74dfe5 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -128,7 +128,7 @@ else
}
// update message count display
-$OUTPUT->set_env('search_request', $search_str ? $search_request : -1);
+$OUTPUT->set_env('search_request', $search_str ? $search_request : '');
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', ceil($count/$IMAP->page_size));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1));