| | |
| | | if (!empty($this->conn->rootdir)) |
| | | { |
| | | $this->set_rootdir($this->conn->rootdir); |
| | | $this->root_ns = ereg_replace('[\.\/]$', '', $this->conn->rootdir); |
| | | $this->root_ns = preg_replace('/[.\/]$/', '', $this->conn->rootdir); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | function set_rootdir($root) |
| | | { |
| | | if (ereg('[\.\/]$', $root)) //(substr($root, -1, 1)==='/') |
| | | if (preg_match('/[.\/]$/', $root)) //(substr($root, -1, 1)==='/') |
| | | $root = substr($root, 0, -1); |
| | | |
| | | $this->root_dir = $root; |
| | |
| | | if ($this->caching_enabled) |
| | | { |
| | | foreach ($uids as $uid) |
| | | { |
| | | $id = $this->_uid2id($uid); |
| | | if ($cached_headers = $this->get_cached_message($cache_key, $id)) |
| | | { |
| | | $this->remove_message_cache($cache_key, $id); |
| | | //$this->get_headers($uid); |
| | | } |
| | | } |
| | | if ($cached_headers = $this->get_cached_message($cache_key, $uid)) |
| | | $this->remove_message_cache($cache_key, $this->_uid2id($uid)); |
| | | |
| | | // close and re-open connection |
| | | // this prevents connection problems with Courier |