thomascube
2011-08-18 fbe54043cf598b19a753dc2b21a7ed558d23fd15
program/include/rcube_imap_generic.php
@@ -1537,7 +1537,7 @@
        if ($bodystr)
            $request .= "BODYSTRUCTURE ";
        $request .= "BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE ";
        $request .= "LIST-POST DISPOSITION-NOTIFICATION-TO".$add.")])";
        $request .= "CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO".$add.")])";
        if (!$this->putLine($request)) {
            $this->setError(self::ERROR_COMMAND, "Unable to send command: $request");
@@ -2180,7 +2180,7 @@
            while ($this->tokenizeResponse($response, 1) == '*') {
                $cmd = strtoupper($this->tokenizeResponse($response, 1));
                // * LIST (<options>) <delimiter> <mailbox>
                if (!$lstatus || $cmd == 'LIST' || $cmd == 'LSUB') {
                if ($cmd == 'LIST' || $cmd == 'LSUB') {
                    list($opts, $delim, $mailbox) = $this->tokenizeResponse($response, 3);
                    // Add to result array
@@ -2208,6 +2208,14 @@
                        list($name, $value) = $this->tokenizeResponse($status, 2);
                        $folders[$mailbox][$name] = $value;
                    }
                }
                // other untagged response line, skip it
                else {
                    $response = ltrim($response);
                    if (($position = strpos($response, "\n")) !== false)
                        $response = substr($response, $position+1);
                    else
                        $response = '';
                }
            }
@@ -3229,8 +3237,8 @@
                    break;
                }
                // excluded chars: SP, CTL, (, ), {, ", ], %
                if (preg_match('/^([\x21\x23\x24\x26\x27\x2A-\x5C\x5E-\x7A\x7C-\x7E]+)/', $str, $m)) {
                // excluded chars: SP, CTL, )
                if (preg_match('/^([^\x00-\x20\x29\x7F]+)/', $str, $m)) {
                    $result[] = $m[1] == 'NIL' ? NULL : $m[1];
                    $str = substr($str, strlen($m[1]));
                }