summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-08 19:11:12 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-08 19:11:12 +0200
commit188247894f6aff3a11f68bbdf94626b8bf58b852 (patch)
treeb6997429e9b4d1bdf787dbfdf3e29cdbc72cf5db /program/include/rcmail.php
parent05e3d11554f751ed6a614abe343141aa1e6ea6da (diff)
Make multi-folder message identifiers work with folders containing commas
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 2ccad03c6..5da181438 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -2025,8 +2025,9 @@ class rcmail extends rcube
$_uid = $uids ?: rcube_utils::get_input_value('_uid', RCUBE_INPUT_GPC);
$_mbox = $mbox ?: (string)rcube_utils::get_input_value('_mbox', RCUBE_INPUT_GPC);
- if (is_array($uid)) {
- return $uid;
+ // already a hash array
+ if (is_array($_uid) && !isset($_uid[0])) {
+ return $_uid;
}
$result = array();
@@ -2040,8 +2041,11 @@ class rcmail extends rcube
}
}
else {
+ if (is_string($_uid))
+ $_uid = explode(',', $_uid);
+
// create a per-folder UIDs array
- foreach (explode(',', $_uid) as $uid) {
+ foreach ((array)$_uid as $uid) {
list($uid, $mbox) = explode('-', $uid, 2);
if (empty($mbox))
$mbox = $_mbox;