alecpl
2010-09-28 08aa031871b030811c4305e5d73b8034315f7c5f
program/include/rcube_imap.php
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/include/rcube_imap.php                                        |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -156,8 +156,7 @@
     */
    function close()
    {
        if ($this->conn && $this->conn->connected())
            $this->conn->close();
        $this->conn->close();
        $this->write_cache();
    }
@@ -1350,8 +1349,8 @@
        // fetch complete headers and add to cache
        if (!empty($for_update)) {
            if ($headers = $this->conn->fetchHeader($mailbox,
                    join(',', $for_update), false, $this->fetch_add_headers)) {
            if ($headers = $this->conn->fetchHeaders($mailbox,
                    join(',', $for_update), false, false, $this->fetch_add_headers)) {
                foreach ($headers as $header) {
                    $this->add_message_cache($cache_key, $header->id, $header, NULL,
                        in_array($header->uid, (array)$for_remove));
@@ -3194,7 +3193,7 @@
                // featch headers if unserialize failed
                if (empty($this->cache[$cache_key][$uid]))
                    $this->cache[$cache_key][$uid] = $this->conn->fetchHeader(
                            preg_replace('/.msg$/', '', $key), $uid, true, $this->fetch_add_headers);
                            preg_replace('/.msg$/', '', $key), $uid, true, false, $this->fetch_add_headers);
            }
        }