|
|
|
@ -3836,13 +3836,13 @@ class rcube_imap_generic
|
|
|
|
|
|
|
|
|
|
if (!is_array($messages)) {
|
|
|
|
|
// if less than 255 bytes long, let's not bother
|
|
|
|
|
if (!$force && strlen($messages)<255) {
|
|
|
|
|
return $messages;
|
|
|
|
|
if (!$force && strlen($messages) < 255) {
|
|
|
|
|
return preg_match('/[^0-9:,]/', $messages) ? 'INVALID' : $messages;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// see if it's already been compressed
|
|
|
|
|
if (strpos($messages, ':') !== false) {
|
|
|
|
|
return $messages;
|
|
|
|
|
return preg_match('/[^0-9:,]/', $messages) ? 'INVALID' : $messages;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// separate, then sort
|
|
|
|
@ -3877,7 +3877,9 @@ class rcube_imap_generic
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// return as comma separated string
|
|
|
|
|
return implode(',', $result);
|
|
|
|
|
$result = implode(',', $result);
|
|
|
|
|
|
|
|
|
|
return preg_match('/[^0-9:,]/', $result) ? 'INVALID' : $result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|