mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 01:28:56 +08:00
Add _FORCE_SELECT_ON_EXAMINE__ property to IMAP client class
This commit is contained in:
parent
efb9db36d2
commit
4a153a59c1
4 changed files with 21 additions and 3 deletions
|
@ -73,6 +73,11 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
*/
|
||||
private $sLogginedUser;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $__FORCE_SELECT_ON_EXAMINE__;
|
||||
|
||||
/**
|
||||
* @access protected
|
||||
*/
|
||||
|
@ -96,6 +101,8 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$this->bIsSelected = false;
|
||||
$this->sLogginedUser = '';
|
||||
|
||||
$this->__FORCE_SELECT_ON_EXAMINE__ = false;
|
||||
|
||||
@\ini_set('xdebug.max_nesting_level', 500);
|
||||
}
|
||||
|
||||
|
@ -854,7 +861,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
*/
|
||||
public function FolderExamine($sFolderName, $bReSelectSameFolders = false)
|
||||
{
|
||||
return $this->selectOrExamineFolder($sFolderName, false, $bReSelectSameFolders);
|
||||
return $this->selectOrExamineFolder($sFolderName, $this->__FORCE_SELECT_ON_EXAMINE__, $bReSelectSameFolders);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,6 +37,14 @@ class MailClient
|
|||
return new self();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \MailSo\Imap\ImapClient
|
||||
*/
|
||||
public function ImapClient()
|
||||
{
|
||||
return $this->oImapClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sServerName
|
||||
* @param int $iPort = 143
|
||||
|
@ -141,10 +149,10 @@ class MailClient
|
|||
*/
|
||||
private function getEnvelopeOrHeadersRequestString()
|
||||
{
|
||||
// return \MailSo\Imap\Enumerations\FetchType::ENVELOPE;
|
||||
|
||||
return \MailSo\Imap\Enumerations\FetchType::BODY_HEADER_PEEK;
|
||||
|
||||
// return \MailSo\Imap\Enumerations\FetchType::ENVELOPE;
|
||||
|
||||
return \MailSo\Imap\Enumerations\FetchType::BuildBodyCustomHeaderRequest(array(
|
||||
\MailSo\Mime\Enumerations\Header::RETURN_PATH,
|
||||
\MailSo\Mime\Enumerations\Header::RECEIVED,
|
||||
|
|
|
@ -4978,6 +4978,8 @@ class Actions
|
|||
{
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
|
||||
}
|
||||
|
||||
$this->MailClient()->ImapClient()->__FORCE_SELECT_ON_EXAMINE__ = !!$this->Config()->Get('labs', 'use_imap_force_selection');
|
||||
}
|
||||
|
||||
return $oAccount;
|
||||
|
|
|
@ -208,6 +208,7 @@ Enables caching in the system'),
|
|||
'suggestions_limit' => array(50),
|
||||
'determine_user_language' => array(true),
|
||||
'use_imap_sort' => array(false),
|
||||
'use_imap_force_selection' => array(false),
|
||||
'use_imap_list_status' => array(false),
|
||||
'use_imap_list_subscribe' => array(true),
|
||||
'use_imap_thread' => array(true),
|
||||
|
|
Loading…
Reference in a new issue