mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
More functions without type hinting found and fixt
Use PECL yaml (else Spyc) Upgrade Spyc (with removed dump code)
This commit is contained in:
parent
cd3d8b94b2
commit
75b4b64118
43 changed files with 893 additions and 1482 deletions
|
|
@ -198,41 +198,38 @@ class Folder
|
|||
$aFlags = $this->oImapFolder->FlagsLowerCase();
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::USER;
|
||||
|
||||
if (\is_array($aFlags))
|
||||
switch (true)
|
||||
{
|
||||
switch (true)
|
||||
{
|
||||
case \in_array('\inbox', $aFlags) || 'INBOX' === \strtoupper($this->FullNameRaw()):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::INBOX;
|
||||
break;
|
||||
case \in_array('\sent', $aFlags):
|
||||
case \in_array('\sentmail', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::SENT;
|
||||
break;
|
||||
case \in_array('\drafts', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::DRAFTS;
|
||||
break;
|
||||
case \in_array('\junk', $aFlags):
|
||||
case \in_array('\spam', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::JUNK;
|
||||
break;
|
||||
case \in_array('\trash', $aFlags):
|
||||
case \in_array('\bin', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::TRASH;
|
||||
break;
|
||||
case \in_array('\important', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::IMPORTANT;
|
||||
break;
|
||||
case \in_array('\flagged', $aFlags):
|
||||
case \in_array('\starred', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::FLAGGED;
|
||||
break;
|
||||
case \in_array('\all', $aFlags):
|
||||
case \in_array('\allmail', $aFlags):
|
||||
case \in_array('\archive', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::ALL;
|
||||
break;
|
||||
}
|
||||
case \in_array('\inbox', $aFlags) || 'INBOX' === \strtoupper($this->FullNameRaw()):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::INBOX;
|
||||
break;
|
||||
case \in_array('\sent', $aFlags):
|
||||
case \in_array('\sentmail', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::SENT;
|
||||
break;
|
||||
case \in_array('\drafts', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::DRAFTS;
|
||||
break;
|
||||
case \in_array('\junk', $aFlags):
|
||||
case \in_array('\spam', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::JUNK;
|
||||
break;
|
||||
case \in_array('\trash', $aFlags):
|
||||
case \in_array('\bin', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::TRASH;
|
||||
break;
|
||||
case \in_array('\important', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::IMPORTANT;
|
||||
break;
|
||||
case \in_array('\flagged', $aFlags):
|
||||
case \in_array('\starred', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::FLAGGED;
|
||||
break;
|
||||
case \in_array('\all', $aFlags):
|
||||
case \in_array('\allmail', $aFlags):
|
||||
case \in_array('\archive', $aFlags):
|
||||
$iListType = \MailSo\Imap\Enumerations\FolderType::ALL;
|
||||
break;
|
||||
}
|
||||
|
||||
return $iListType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue