summaryrefslogtreecommitdiff
path: root/program/steps/mail/move_del.inc
diff options
context:
space:
mode:
authorThomas <tb@woodcrest.local>2013-10-09 17:12:30 +0200
committerThomas <tb@woodcrest.local>2013-10-09 17:12:30 +0200
commit9e63cd5f24defa521724dfe3dcbbaa4385761836 (patch)
tree9e089f565808323f66ff10eb6d78f133ed859f5a /program/steps/mail/move_del.inc
parentf540f86d19ae1d374ba3c78fe11eaf3f771af150 (diff)
Support globally unique message UIDs with IMAP folder name appended
Diffstat (limited to 'program/steps/mail/move_del.inc')
-rw-r--r--program/steps/mail/move_del.inc21
1 files changed, 11 insertions, 10 deletions
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index f15cd2460..e172d7188 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -5,7 +5,7 @@
| program/steps/mail/move_del.inc |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2009, The Roundcube Dev Team |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -30,12 +30,13 @@ $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize());
// move messages
if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
- $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
$target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
$trash = $RCMAIL->config->get('trash_mbox');
- $moved = $RCMAIL->storage->move_message($uids, $target, $mbox);
+ foreach (rcmail_get_uids() as $mbox => $uids) {
+ $moved += (int)$RCMAIL->storage->move_message($uids, $target, $mbox);
+ $count += count($uids);
+ }
if (!$moved) {
// send error message
@@ -46,17 +47,17 @@ if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_targe
exit;
}
else {
- $OUTPUT->show_message('messagemoved', 'confirmation');
+ $OUTPUT->show_message('messagemoved', 'confirmation');
}
$addrows = true;
}
// delete messages
else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) {
- $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
-
- $del = $RCMAIL->storage->delete_message($uids, $mbox);
+ foreach (rcmail_get_uids() as $mbox => $uids) {
+ $del += (int)$RCMAIL->storage->delete_message($uids, $mbox);
+ $count += count($uids);
+ }
if (!$del) {
// send error message
@@ -67,7 +68,7 @@ else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) {
exit;
}
else {
- $OUTPUT->show_message('messagedeleted', 'confirmation');
+ $OUTPUT->show_message('messagedeleted', 'confirmation');
}
$addrows = true;