diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/copy.inc | 7 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 2 | ||||
-rw-r--r-- | program/steps/mail/mark.inc | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/program/steps/mail/copy.inc b/program/steps/mail/copy.inc index 79e207aa7..5668f7c4b 100644 --- a/program/steps/mail/copy.inc +++ b/program/steps/mail/copy.inc @@ -5,7 +5,7 @@ | program/steps/mail/copy.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -29,7 +29,10 @@ if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { $target = rcube_utils::get_input_value('_target_mbox', rcube_utils::INPUT_POST, true); foreach (rcmail::get_uids() as $mbox => $uids) { - $copied += (int)$RCMAIL->storage->copy_message($uids, $target, $mbox); + if ($mbox == $target) + $copied++; + else + $copied += (int)$RCMAIL->storage->copy_message($uids, $target, $mbox); } if (!$copied) { diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 630086a68..f711da3e1 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -69,7 +69,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search']) } // remove mbox part from _uid -if (($_uid = get_input_value('_uid', RCUBE_INPUT_GPC)) && preg_match('/^\d+-[^,]+$/', $_uid)) { +if (($_uid = rcube_utils::get_input_value('_uid', RCUBE_INPUT_GPC)) && !is_array($_uid) && preg_match('/^\d+-.+/', $_uid)) { list($_uid, $mbox) = explode('-', $_uid, 2); if (isset($_GET['_uid'])) $_GET['_uid'] = $_uid; if (isset($_POST['_uid'])) $_POST['_uid'] = $_uid; diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index e81f6c9f5..4e83f975c 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -68,7 +68,9 @@ if (($_uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) if ($flag == 'DELETED' && $read_deleted && !empty($_POST['_ruid'])) { $ruids = rcube_utils::get_input_value('_ruid', rcube_utils::INPUT_POST); - $read = $RCMAIL->storage->set_flag($ruids, 'SEEN'); + foreach (rcmail::get_uids($ruids) as $mbox => $uids) { + $read += (int)$RCMAIL->storage->set_flag($uids, 'SEEN', $mbox); + } if ($read && !$skip_deleted) { $OUTPUT->command('flag_deleted_as_read', $ruids); |