summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
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;