| | |
| | | } |
| | | |
| | | // Give plugins a chance to provide a list of folders |
| | | $data = rcmail::get_instance()->plugins->exec_hook('storage_folders', |
| | | $data = rcube::get_instance()->plugins->exec_hook('storage_folders', |
| | | array('root' => $root, 'name' => $name, 'filter' => $filter, 'mode' => 'LIST')); |
| | | |
| | | if (isset($data['folders'])) { |
| | |
| | | /** |
| | | * Enable or disable indexes caching |
| | | * |
| | | * @param string $type Cache type (@see rcmail::get_cache) |
| | | * @param string $type Cache type (@see rcube::get_cache) |
| | | */ |
| | | public function set_caching($type) |
| | | { |
| | |
| | | protected function get_cache_engine() |
| | | { |
| | | if ($this->caching && !$this->cache) { |
| | | $rcmail = rcube::get_instance(); |
| | | $ttl = $rcmail->config->get('message_cache_lifetime', '10d') - mktime(); |
| | | $this->cache = $rcmail->get_cache('IMAP', $this->caching, $ttl); |
| | | $rcube = rcube::get_instance(); |
| | | $ttl = $rcube->config->get('message_cache_lifetime', '10d') - mktime(); |
| | | $this->cache = $rcube->get_cache('IMAP', $this->caching, $ttl); |
| | | } |
| | | |
| | | return $this->cache; |
| | |
| | | public function expunge_cache() |
| | | { |
| | | if ($this->mcache) { |
| | | $ttl = rcmail::get_instance()->config->get('message_cache_lifetime', '10d'); |
| | | $ttl = rcube::get_instance()->config->get('message_cache_lifetime', '10d'); |
| | | $this->mcache->expunge($ttl); |
| | | } |
| | | |
| | |
| | | protected function get_mcache_engine() |
| | | { |
| | | if ($this->messages_caching && !$this->mcache) { |
| | | $rcmail = rcube::get_instance(); |
| | | if ($dbh = $rcmail->get_dbh()) { |
| | | $rcube = rcube::get_instance(); |
| | | if ($dbh = $rcube->get_dbh()) { |
| | | $this->mcache = new rcube_imap_cache( |
| | | $dbh, $this, $rcmail->get_user_id(), $this->options['skip_deleted']); |
| | | $dbh, $this, $rcube->get_user_id(), $this->options['skip_deleted']); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public function debug_handler(&$imap, $message) |
| | | { |
| | | rcmail::write_log('imap', $message); |
| | | rcube::write_log('imap', $message); |
| | | } |
| | | |
| | | |