Aleksander Machniak
2012-11-13 003b17e2384a3537ae2c724f41c7c4252a9dafd0
program/include/rcube_imap_generic.php
@@ -2180,7 +2180,7 @@
                            $result[$id]->encoding = $string;
                        break;
                        case 'content-type':
                            $ctype_parts = preg_split('/[; ]/', $string);
                            $ctype_parts = preg_split('/[; ]+/', $string);
                            $result[$id]->ctype = strtolower(array_shift($ctype_parts));
                            if (preg_match('/charset\s*=\s*"?([a-z0-9\-\.\_]+)"?/i', $string, $regs)) {
                                $result[$id]->charset = $regs[1];
@@ -2379,7 +2379,7 @@
        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 @@
        }
        if ($binary) {
            // WARNING: Use $formatting argument with care, this may break binary data stream
            $mode = -1;
        }
@@ -3530,6 +3531,10 @@
     */
    static function uncompressMessageSet($messages)
    {
        if (empty($messages)) {
            return array();
        }
        $result   = array();
        $messages = explode(',', $messages);
@@ -3538,7 +3543,7 @@
            $max   = max($items[0], $items[1]);
            for ($x=$items[0]; $x<=$max; $x++) {
                $result[] = $x;
                $result[] = (int)$x;
            }
            unset($messages[$idx]);
        }
@@ -3651,18 +3656,6 @@
        // literal-string
        return sprintf("{%d}\r\n%s", strlen($string), $string);
    }
    /**
     * Unescapes quoted-string
     *
     * @param string  $string       IMAP string
     *
     * @return string String
     */
    static function unEscape($string)
    {
        return stripslashes($string);
    }
    /**