| | |
| | | if ($this->index_sort && $this->sort_field == 'date') |
| | | { |
| | | if ($this->skip_deleted) { |
| | | $msg_index = $this->_search_index($mailbox, 'ALL'); |
| | | // @TODO: this could be cached |
| | | $msg_index = $this->_search_index($mailbox, 'ALL UNDELETED'); |
| | | $max = max($msg_index); |
| | | list($begin, $end) = $this->_get_message_range(count($msg_index), $page); |
| | | $msg_index = array_slice($msg_index, $begin, $end-$begin); |
| | |
| | | // convert charset (if text or message part) |
| | | if ($o_part->ctype_primary=='text' || $o_part->ctype_primary=='message') { |
| | | // assume default if no charset specified |
| | | if (empty($o_part->charset)) |
| | | if (empty($o_part->charset) || strtolower($o_part->charset) == 'us-ascii') |
| | | $o_part->charset = $this->default_charset; |
| | | |
| | | $body = rcube_charset_convert($body, $o_part->charset); |