summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
authorAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
committerAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
commit92cd7f34b07e86062f2c024039e3309768b48ce6 (patch)
tree63b9f39280ebcab80742d9f2b4db6a139c1791e1 /program/steps/mail/search.inc
parent029d18f13bcf01aa2f1f08dbdfc6400c081bf7cb (diff)
parent443b92a7ee19e321b350750240e0fc54ec5be357 (diff)
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index db5424b3b..fb1b48797 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -69,7 +69,7 @@ else if (preg_match("/^subject:.*/i", $str))
else if (preg_match("/^body:.*/i", $str))
{
list(,$srch) = explode(":", $str);
- $subject['text'] = "TEXT";
+ $subject['body'] = "BODY";
}
else if (strlen(trim($str)))
{
@@ -81,7 +81,7 @@ else if (strlen(trim($str)))
break;
}
else {
- $subject[$header] = 'HEADER '.strtoupper($header);
+ $subject[$header] = ($header != 'body' ? 'HEADER ' : '') . strtoupper($header);
}
}
@@ -89,7 +89,8 @@ else if (strlen(trim($str)))
$search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT);
$search_mods[$mbox] = array_fill_keys(array_keys($subject), 1);
$RCMAIL->user->save_prefs(array('search_mods' => $search_mods));
- } else {
+ }
+ else {
// search in subject by default
$subject['subject'] = 'HEADER SUBJECT';
}
@@ -143,5 +144,6 @@ else {
$OUTPUT->set_env('search_request', $search_str ? $search_request : '');
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', ceil($count/$RCMAIL->storage->get_pagesize()));
+$OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS'));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox);
$OUTPUT->send();