diff options
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_imap.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index d867f942c..0eb9f7b36 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -982,10 +982,14 @@ class rcube_imap * @access private * @see rcube_imap::search() */ - function _search_index($mailbox, $criteria='ALL', $charset='', $sort_field='') + function _search_index($mailbox, $criteria='ALL', $charset=NULL, $sort_field=NULL) { if ($this->get_capability('sort')) + { + $sort_field = $sort_field ? $sort_field : $this->sort_field; + $charset = $charset ? $charset : $this->default_charset; $a_messages = iil_C_Sort($this->conn, $mailbox, $sort_field, $criteria, FALSE, $charset); + } else $a_messages = iil_C_Search($this->conn, $mailbox, ($charset ? "CHARSET $charset " : '') . $criteria); |