create new emailadmin_imap object, when changing to or from admin connection

This commit is contained in:
Ralf Becker 2014-11-11 12:50:16 +00:00
parent 8db75242b2
commit 0217d8ad0d
2 changed files with 4 additions and 3 deletions

View File

@ -290,7 +290,7 @@ class emailadmin_account implements ArrayAccess
*/
public function imapServer($_adminConnection=false, $_timeout=null)
{
if (!isset($this->imapServer))
if (!isset($this->imapServer) || $this->imapServer->isAdminConnection !== $_adminConnection)
{
// make sure mbstring.func_overload=0
static $func_overload = null;

View File

@ -46,6 +46,7 @@ require_once EGW_INCLUDE_ROOT.'/emailadmin/inc/class.defaultimap.inc.php';
* @property-read boolean $acc_further_identities are non-admin users allowed to create further identities
* @property-read boolean $acc_user_editable are non-admin users allowed to edit this account, if it is for them
* @property-read array $params parameters passed to constructor (all above as array)
* @property-read boolean|int|string $isAdminConnection admin connection if true or account_id or imap username
*/
class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
{
@ -107,9 +108,9 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
protected $enableSieve = false;
/**
* True if connection is an admin connection
* Connection is an admin connection
*
* @var boolean
* @var boolean|int|string $isAdminConnection admin connection if true or account_id or imap username
*/
protected $isAdminConnection = false;