Thomas Bruederli
2015-07-31 2965a981b7ec22866fbdf2d567d87e2d068d3617
program/lib/Roundcube/rcube_imap_cache.php
@@ -1245,13 +1245,15 @@
    private function message_object_prepare(&$msg, &$size = 0)
    {
        // Remove body too big
        if ($msg->body && ($length = strlen($msg->body))) {
            $size += $length;
        if (isset($msg->body)) {
            $length = strlen($msg->body);
            if ($size > $this->threshold * 1024) {
                $size -= $length;
            if ($msg->body_modified || $size + $length > $this->threshold * 1024) {
                unset($msg->body);
            }
            else {
                $size += $length;
            }
        }
        // Fix mimetype which might be broken by some code when message is displayed