summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-10 08:41:34 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-10 08:41:34 +0200
commiteddaf0b5f68c9863181b62db33bc468d38071e8a (patch)
tree16028e6f44573377ba901f097d64e97b1b79f6c2 /program/steps
parent70c0d256841aa736a3f4a74a345ec4b0dfcdad78 (diff)
parent39ca69b0072a618c0ccc112a016a44970c6667f7 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc9
-rw-r--r--program/steps/mail/copy.inc7
-rw-r--r--program/steps/mail/func.inc4
-rw-r--r--program/steps/mail/list.inc5
-rw-r--r--program/steps/mail/mark.inc4
-rw-r--r--program/steps/mail/move_del.inc8
6 files changed, 30 insertions, 7 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 040d81689..22ebaed8d 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -463,6 +463,11 @@ function rcmail_process_compose_params(&$COMPOSE)
}
}
+ // resolve _forward_uid=* to an absolute list of messages from a search result
+ if ($COMPOSE['param']['forward_uid'] == '*' && is_object($_SESSION['search'][1])) {
+ $COMPOSE['param']['forward_uid'] = $_SESSION['search'][1]->get();
+ }
+
// clean HTML message body which can be submitted by URL
if (!empty($COMPOSE['param']['body'])) {
$COMPOSE['param']['body'] = rcmail_wash_html($COMPOSE['param']['body'], array('safe' => false, 'inline_html' => true), array());
@@ -1259,10 +1264,10 @@ function rcmail_write_forward_attachments()
$index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order());
$COMPOSE['forward_uid'] = $index->get();
}
- else if (strpos($COMPOSE['forward_uid'], ':')) {
+ else if (!is_array($COMPOSE['forward_uid']) && strpos($COMPOSE['forward_uid'], ':')) {
$COMPOSE['forward_uid'] = rcube_imap_generic::uncompressMessageSet($COMPOSE['forward_uid']);
}
- else {
+ else if (is_string($COMPOSE['forward_uid'])) {
$COMPOSE['forward_uid'] = explode(',', $COMPOSE['forward_uid']);
}
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 a541fca96..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;
@@ -393,6 +393,8 @@ function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null
$OUTPUT->command('select_folder', '');
}
+ $OUTPUT->set_env('multifolder_listing', $multifolder);
+
if (empty($a_headers)) {
return;
}
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index a8fc9eb8a..36c79fb29 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -101,6 +101,11 @@ $OUTPUT->set_env('current_page', $count ? $RCMAIL->storage->get_page() : 1);
$OUTPUT->set_env('exists', $exists);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name);
+// remove old message rows if commanded by the client
+if (!empty($_REQUEST['_clear'])) {
+ $OUTPUT->command('clear_message_list');
+}
+
// add message rows
rcmail_js_message_list($a_headers, false, $cols);
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);
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index ae367b4f7..9c1acd5d2 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -60,7 +60,13 @@ if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_targe
$OUTPUT->show_message('messagemoved', 'confirmation');
}
- $addrows = true;
+ if (!empty($_POST['_refresh'])) {
+ // FIXME: send updated message rows instead of releading the entire list
+ $OUTPUT->command('refresh_list');
+ }
+ else {
+ $addrows = true;
+ }
}
// delete messages
else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) {