summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-05 22:56:29 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-05 22:56:29 +0000
commit14f5e393c844b43040be4b0286eb68aa4a66c751 (patch)
tree6fbf94e26c7a2ea61d21e131f03303b4f266bb0e /roundcubemail/program/steps
parent38ac1065601a6c780d0092aca93c9d5eeab5b07d (diff)
Applied patch to prevent from purging inbox (#1484449) + CSS hack for Safari
git-svn-id: https://svn.roundcube.net/trunk@1020 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/mail/folders.inc24
1 files changed, 14 insertions, 10 deletions
diff --git a/roundcubemail/program/steps/mail/folders.inc b/roundcubemail/program/steps/mail/folders.inc
index c7c39fbea..b84398f26 100644
--- a/roundcubemail/program/steps/mail/folders.inc
+++ b/roundcubemail/program/steps/mail/folders.inc
@@ -39,18 +39,22 @@ if ($_action=='expunge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST)))
// clear mailbox
else if ($_action=='purge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST)))
{
- $success = $IMAP->clear_mailbox($mbox);
-
- if ($success && !empty($_REQUEST['_reload']))
+ // we should only be purging trash and junk
+ if($mbox == $CONFIG['trash_mbox'] || $mbox == $CONFIG['junk_mbox'])
{
- $OUTPUT->set_env('messagecount', 0);
- $OUTPUT->set_env('pagecount', 0);
- $OUTPUT->command('message_list.clear');
- $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
- $OUTPUT->command('set_unread_count', $mbox_name, 0);
+ $success = $IMAP->clear_mailbox($mbox);
+
+ if ($success && !empty($_REQUEST['_reload']))
+ {
+ $OUTPUT->set_env('messagecount', 0);
+ $OUTPUT->set_env('pagecount', 0);
+ $OUTPUT->command('message_list.clear');
+ $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
+ $OUTPUT->command('set_unread_count', $mbox_name, 0);
+ }
+ else
+ $commands = "// purged: $success";
}
- else
- $commands = "// purged: $success";
}
$OUTPUT->send($commands);