summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-14 10:37:32 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-14 10:37:32 +0000
commit986bb5b62f0fb7463accc221bd7ab46844ce65e1 (patch)
tree0355d911fd19bf5a45f9a998f83dec61f6520cbb /roundcubemail/program/steps/mail
parent7b35a73491843301ce29410c90e2be8a4fee03d0 (diff)
- Display IMAP errors for LIST/THREAD/SEARCH commands, fixes #1486905
git-svn-id: https://svn.roundcube.net/trunk@4090 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/list.inc15
-rw-r--r--roundcubemail/program/steps/mail/search.inc5
2 files changed, 16 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/list.inc b/roundcubemail/program/steps/mail/list.inc
index f5fc44bd4..6353be7cc 100644
--- a/roundcubemail/program/steps/mail/list.inc
+++ b/roundcubemail/program/steps/mail/list.inc
@@ -103,10 +103,17 @@ if (isset($a_headers) && count($a_headers))
if ($search_request)
$OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $count));
}
-else if ($search_request)
- $OUTPUT->show_message('searchnomatch', 'notice');
-else
- $OUTPUT->show_message('nomessagesfound', 'notice');
+else {
+ // handle IMAP errors (e.g. #1486905)
+ if ($err_code = $IMAP->get_error_code()) {
+ $err_str = $IMAP->get_error_str();
+ $OUTPUT->show_message('servererrormsg', 'error', array('msg' => $err_str));
+ }
+ else if ($search_request)
+ $OUTPUT->show_message('searchnomatch', 'notice');
+ else
+ $OUTPUT->show_message('nomessagesfound', 'notice');
+}
// send response
$OUTPUT->send();
diff --git a/roundcubemail/program/steps/mail/search.inc b/roundcubemail/program/steps/mail/search.inc
index db46ce428..90d1c374c 100644
--- a/roundcubemail/program/steps/mail/search.inc
+++ b/roundcubemail/program/steps/mail/search.inc
@@ -122,6 +122,11 @@ if (!empty($result_h)) {
if ($search_str)
$OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $IMAP->messagecount(NULL, 'ALL')));
}
+// handle IMAP errors (e.g. #1486905)
+else if ($err_code = $IMAP->get_error_code()) {
+ $err_str = $IMAP->get_error_str();
+ $OUTPUT->show_message('servererrormsg', 'error', array('msg' => $err_str));
+}
else {
$OUTPUT->show_message('searchnomatch', 'notice');
}