diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-10 08:41:34 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-10 08:41:34 +0200 |
commit | eddaf0b5f68c9863181b62db33bc468d38071e8a (patch) | |
tree | 16028e6f44573377ba901f097d64e97b1b79f6c2 /program/include/rcmail.php | |
parent | 70c0d256841aa736a3f4a74a345ec4b0dfcdad78 (diff) | |
parent | 39ca69b0072a618c0ccc112a016a44970c6667f7 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r-- | program/include/rcmail.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index a8124523a..431b77284 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -2028,8 +2028,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(); @@ -2043,8 +2044,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; |