Aleksander Machniak
2016-03-28 46f7b7096450939fe03c95aa81ce06ae4bfca89d
program/lib/Roundcube/rcube_mime_decode.php
@@ -67,18 +67,18 @@
    /**
     * Performs the decoding process.
     *
     * @param string $input The input to decode
     * @param string $input   The input to decode
     * @param bool   $convert Convert result to rcube_message_part structure
     *
     * @return object|bool Decoded results or False on failure
     */
    public function decode($input)
    public function decode($input, $convert = true)
    {
        list($header, $body) = $this->splitBodyHeader($input);
        // @TODO: Since this is a part of Roundcube Framework
        // we should return rcube_message_part structure
        $struct = $this->do_decode($header, $body);
        if ($struct = $this->do_decode($header, $body)) {
        if ($struct && $convert) {
            $struct = $this->structure_part($struct);
        }
@@ -176,6 +176,8 @@
            case 'multipart/alternative':
            case 'multipart/related':
            case 'multipart/mixed':
            case 'multipart/signed':
            case 'multipart/encrypted':
                if (!isset($content_type['other']['boundary'])) {
                    return false;
                }
@@ -192,7 +194,7 @@
            case 'message/rfc822':
                $obj = new rcube_mime_decode($this->params);
                $return->parts[] = $obj->decode($body);
                $return->parts[] = $obj->decode($body, false);
                unset($obj);
                break;