mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
MailSo Fixes (remove xlist)
This commit is contained in:
parent
6debdee43e
commit
2271712305
5 changed files with 53 additions and 50 deletions
|
|
@ -13,9 +13,9 @@ class FolderType
|
|||
const INBOX = 1;
|
||||
const SENT = 2;
|
||||
const DRAFTS = 3;
|
||||
const SPAM = 4;
|
||||
const JUNK = 4;
|
||||
const TRASH = 5;
|
||||
const IMPORTANT = 10;
|
||||
const STARRED = 11;
|
||||
const ARCHIVE = 12;
|
||||
const FLAGGED = 11;
|
||||
const ALL = 12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -686,6 +686,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
* @param bool $bIsSubscribeList
|
||||
* @param string $sParentFolderName = ''
|
||||
* @param string $sListPattern = '*'
|
||||
* @param bool $bUseListStatus = false
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
|
|
@ -697,12 +698,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$sCmd = 'LSUB';
|
||||
if (!$bIsSubscribeList)
|
||||
{
|
||||
if ($bUseListStatus)
|
||||
{
|
||||
$bUseListStatus = $this->IsSupported('LIST-STATUS');
|
||||
}
|
||||
|
||||
$sCmd = (!$bUseListStatus && $this->IsSupported('XLIST') && !$this->IsSupported('LIST-EXTENDED')) ? 'XLIST' : 'LIST';
|
||||
$sCmd = 'LIST';
|
||||
}
|
||||
|
||||
$sListPattern = 0 === strlen(trim($sListPattern)) ? '*' : $sListPattern;
|
||||
|
|
@ -711,8 +707,8 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$this->EscapeString($sParentFolderName),
|
||||
$this->EscapeString($sListPattern)
|
||||
);
|
||||
|
||||
if ($bUseListStatus)
|
||||
|
||||
if ($bUseListStatus && $this->IsSupported('LIST-STATUS'))
|
||||
{
|
||||
$aParameters[] = 'RETURN';
|
||||
$aParameters[] = array(
|
||||
|
|
@ -724,6 +720,10 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$bUseListStatus = false;
|
||||
}
|
||||
|
||||
$this->SendRequest($sCmd, $aParameters);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue