| | |
| | | class rcube_imap |
| | | { |
| | | public $debug_level = 1; |
| | | public $error_code = 0; |
| | | public $skip_deleted = false; |
| | | public $root_dir = ''; |
| | | public $page_size = 10; |
| | |
| | | } |
| | | // write error log |
| | | else if ($this->conn->error) { |
| | | $this->error_code = $this->conn->errornum; |
| | | if ($pass && $user) |
| | | raise_error(array('code' => 403, 'type' => 'imap', |
| | | 'file' => __FILE__, 'line' => __LINE__, |
| | |
| | | $this->conn->select($this->mailbox); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns code of last error |
| | | * |
| | | * @return int Error code |
| | | */ |
| | | function get_error_code() |
| | | { |
| | | return ($this->conn) ? $this->conn->errornum : 0; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns message of last error |
| | | * |
| | | * @return string Error message |
| | | */ |
| | | function get_error_str() |
| | | { |
| | | return ($this->conn) ? $this->conn->error : ''; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set options to be used in rcube_imap_generic::connect() |
| | | * |
| | |
| | | if (!empty($this->icache['threads'])) |
| | | return count($this->icache['threads']['tree']); |
| | | |
| | | list ($thread_tree, $msg_depth, $has_children) = $this->_fetch_threads($mailbox); |
| | | if (is_array($result = $this->_fetch_threads($mailbox))) |
| | | $thread_tree = array_shift($result); |
| | | |
| | | $msg_count = count($msg_depth); |
| | | |
| | | // $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children); |
| | | // list ($thread_tree, $msg_depth, $has_children) = $result; |
| | | // $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children); |
| | | return count($thread_tree); |
| | | } |
| | | |