summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-05-13 15:30:14 +0200
committerAleksander Machniak <alec@alec.pl>2014-05-13 15:30:14 +0200
commitb3db98dd1e360eec21f282aadf0883e85d0fca04 (patch)
tree3b9dcfcfe0e69acd280fecce9e597daf0b4b1932 /program
parent7d3d62e5ed98cfed8b46bbb1c620142f190d2c03 (diff)
Fix some typos and skip some function calls irrelevant in multi-folder mode
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/search.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index e610e9137..4aa22e14b 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -162,9 +162,11 @@ if (!empty($result_h)) {
// remember last HIGHESTMODSEQ value (if supported)
// we need it for flag updates in check-recent
- $data = $RCMAIL->storage->folder_data($mbox_name);
- if (!empty($data['HIGHESTMODSEQ'])) {
- $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ if ($mbox !== null) {
+ $data = $RCMAIL->storage->folder_data($mbox);
+ if (!empty($data['HIGHESTMODSEQ'])) {
+ $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ }
}
}
// handle IMAP errors (e.g. #1486905)
@@ -189,7 +191,7 @@ $OUTPUT->set_env('search_filter', $_SESSION['search_filter']);
$OUTPUT->set_env('threading', $RCMAIL->storage->get_threading());
$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->set_env('exists', $mbox === null ? 0 : $RCMAIL->storage->count($mbox, 'EXISTS'));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox);
$OUTPUT->set_pagetitle($RCMAIL->gettext(array('name' => 'searchfor', 'vars' => array('q' => $str))));
$OUTPUT->send();