summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap_generic.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r--program/include/rcube_imap_generic.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 52bf0e37a..bc7ecfc37 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2379,7 +2379,7 @@ class rcube_imap_generic
return $this->handlePartBody($mailbox, $id, $is_uid, $part);
}
- function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL, $formatted=true)
+ function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL, $formatted=false)
{
if (!$this->select($mailbox)) {
return false;
@@ -2417,6 +2417,7 @@ class rcube_imap_generic
}
if ($binary) {
+ // WARNING: Use $formatting argument with care, this may break binary data stream
$mode = -1;
}
@@ -3530,6 +3531,10 @@ class rcube_imap_generic
*/
static function uncompressMessageSet($messages)
{
+ if (empty($messages)) {
+ return array();
+ }
+
$result = array();
$messages = explode(',', $messages);
@@ -3538,7 +3543,7 @@ class rcube_imap_generic
$max = max($items[0], $items[1]);
for ($x=$items[0]; $x<=$max; $x++) {
- $result[] = $x;
+ $result[] = (int)$x;
}
unset($messages[$idx]);
}
@@ -3654,18 +3659,6 @@ class rcube_imap_generic
}
/**
- * Unescapes quoted-string
- *
- * @param string $string IMAP string
- *
- * @return string String
- */
- static function unEscape($string)
- {
- return stripslashes($string);
- }
-
- /**
* Set the value of the debugging flag.
*
* @param boolean $debug New value for the debugging flag.