diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-05 12:45:51 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-05 12:45:51 +0000 |
| commit | 59f8f9011852a3840279f07e57e859917c26b0dc (patch) | |
| tree | a49d1171dff0b6540a53717cc9604369b81e25be /roundcubemail/program | |
| parent | bbb6597e02f1ac8b5865b5bab38c471f752be38b (diff) | |
- Check for "Permission denied" string in IMAP error messages to display more appropriate message to the user
git-svn-id: https://svn.roundcube.net/trunk@5170 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 7e85e01fb..100feb68b 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1568,7 +1568,11 @@ function rcmail_display_server_error($fallback=null, $fallback_args=null) $RCMAIL->output->show_message('errorreadonly', 'error'); } else if ($err_code && ($err_str = $RCMAIL->imap->get_error_str())) { - $RCMAIL->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); + // try to detect access rights problem and display appropriate message + if (stripos($err_str, 'Permission denied') !== false) + $RCMAIL->output->show_message('errornoperm', 'error'); + else + $RCMAIL->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); } else if ($fallback) { $RCMAIL->output->show_message($fallback, 'error', $fallback_args); |
