|
|
@ -5,7 +5,7 @@
|
|
|
|
| program/include/rcmail.php |
|
|
|
|
| program/include/rcmail.php |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| This file is part of the RoundCube Webmail client |
|
|
|
|
| This file is part of the RoundCube Webmail client |
|
|
|
|
| Copyright (C) 2008-2009, RoundCube Dev. - Switzerland |
|
|
|
|
| Copyright (C) 2008-2010, RoundCube Dev. - Switzerland |
|
|
|
|
| Licensed under the GNU GPL |
|
|
|
|
| Licensed under the GNU GPL |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| PURPOSE: |
|
|
|
|
| PURPOSE: |
|
|
|
@ -374,6 +374,10 @@ class rcmail
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function imap_init($connect = false)
|
|
|
|
public function imap_init($connect = false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// already initialized
|
|
|
|
|
|
|
|
if (is_object($this->imap))
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
$this->imap = new rcube_imap($this->db);
|
|
|
|
$this->imap = new rcube_imap($this->db);
|
|
|
|
$this->imap->debug_level = $this->config->get('debug_level');
|
|
|
|
$this->imap->debug_level = $this->config->get('debug_level');
|
|
|
|
$this->imap->skip_deleted = $this->config->get('skip_deleted');
|
|
|
|
$this->imap->skip_deleted = $this->config->get('skip_deleted');
|
|
|
@ -405,8 +409,12 @@ class rcmail
|
|
|
|
if ($hook['fetch_headers'])
|
|
|
|
if ($hook['fetch_headers'])
|
|
|
|
$this->imap->fetch_add_headers = $hook['fetch_headers'];
|
|
|
|
$this->imap->fetch_add_headers = $hook['fetch_headers'];
|
|
|
|
|
|
|
|
|
|
|
|
if ($connect)
|
|
|
|
// support this parameter for backward compatibility but log warning
|
|
|
|
|
|
|
|
if ($connect) {
|
|
|
|
$this->imap_connect();
|
|
|
|
$this->imap_connect();
|
|
|
|
|
|
|
|
raise_error(array('code' => 800, 'type' => 'imap', 'file' => __FILE__,
|
|
|
|
|
|
|
|
'message' => "rcube::imap_init(true) is deprecated, use rcube::imap_connect() instead"), true, false);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -841,7 +849,7 @@ class rcmail
|
|
|
|
if (!$this->authenticate_session())
|
|
|
|
if (!$this->authenticate_session())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
$this->imap_init(true);
|
|
|
|
$this->imap_connect();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($config['logout_purge'] && !empty($config['trash_mbox'])) {
|
|
|
|
if ($config['logout_purge'] && !empty($config['trash_mbox'])) {
|
|
|
|