summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-12-08 12:52:04 +0000
committeralecpl <alec@alec.pl>2010-12-08 12:52:04 +0000
commit90f81a6c8de5aecfa36c54cc5260d25ba883aa51 (patch)
tree474e5e9edbae20f38f928fbe30b8a6cbd465fd2a /program/steps/settings
parent5be0d000ac8431079617e8eda2a9675b1bdbe417 (diff)
- Better support for READ-ONLY and NOPERM responses handling (#1487083)
- Add confirmation message on purge/expunge commands response - Fix CLOSE was called on unselected mailbox
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/folders.inc15
1 files changed, 9 insertions, 6 deletions
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 1ceca7416..7ae4fb35d 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -34,7 +34,7 @@ if ($RCMAIL->action == 'subscribe')
// Handle virtual (non-existing) folders
if (!$result && $IMAP->get_error_code() == -1 &&
- strpos($IMAP->get_error_str(), '[TRYCREATE]')
+ $IMAP->get_response_code() == rcube_imap::TRYCREATE
) {
$result = $IMAP->create_mailbox($mbox, true);
if ($result) {
@@ -45,7 +45,7 @@ if ($RCMAIL->action == 'subscribe')
if ($result)
$OUTPUT->show_message('foldersubscribed', 'confirmation');
else
- $OUTPUT->show_message('errorsaving', 'error');
+ rcmail_display_server_error('errorsaving');
}
}
@@ -58,7 +58,7 @@ else if ($RCMAIL->action == 'unsubscribe')
if ($result)
$OUTPUT->show_message('folderunsubscribed', 'confirmation');
else
- $OUTPUT->show_message('errorsaving', 'error');
+ rcmail_display_server_error('errorsaving');
}
}
@@ -92,7 +92,7 @@ else if ($RCMAIL->action == 'delete-folder')
$OUTPUT->command('set_quota', rcmail_quota_content());
}
else if (!$deleted) {
- $OUTPUT->show_message('errorsaving', 'error');
+ rcmail_display_server_error('errorsaving');
}
}
@@ -141,7 +141,7 @@ else if ($RCMAIL->action == 'rename-folder')
rcube_charset_convert($name, 'UTF7-IMAP'), $display_rename, $before);
}
else if (!$rename) {
- $OUTPUT->show_message('errorsaving', 'error');
+ rcmail_display_server_error('errorsaving');
}
}
@@ -179,7 +179,7 @@ else if ($RCMAIL->action == 'purge')
$OUTPUT->command('show_folder', $mbox_utf8, null, true);
}
else {
- $OUTPUT->show_message('errorsaving', 'error');
+ rcmail_display_server_error('errorsaving');
}
}
@@ -195,6 +195,9 @@ else if ($RCMAIL->action == 'folder-size')
if ($size !== false) {
$OUTPUT->command('folder_size_update', show_bytes($size));
}
+ else {
+ rcmail_display_server_error();
+ }
}
if ($OUTPUT->ajax_call)