Replace some FolderSelect to FolderExamine because they should be READ-ONLY

This commit is contained in:
djmaze 2022-01-06 16:20:10 +01:00
parent d691e3c327
commit 239c7c28fb

View file

@ -222,7 +222,7 @@ class MailClient
throw new \MailSo\Base\Exceptions\InvalidArgumentException; throw new \MailSo\Base\Exceptions\InvalidArgumentException;
} }
$this->oImapClient->FolderSelect($sFolderName); $this->oImapClient->FolderExamine($sFolderName);
$oBodyStructure = null; $oBodyStructure = null;
$oMessage = null; $oMessage = null;
@ -293,7 +293,7 @@ class MailClient
throw new \MailSo\Base\Exceptions\InvalidArgumentException; throw new \MailSo\Base\Exceptions\InvalidArgumentException;
} }
$this->oImapClient->FolderSelect($sFolderName); $this->oImapClient->FolderExamine($sFolderName);
$sFileName = ''; $sFileName = '';
$sContentType = ''; $sContentType = '';
@ -557,7 +557,7 @@ class MailClient
if ($iPrevUidNext && $iPrevUidNext != $iCurrentUidNext && 'INBOX' === $sFolderName && \MailSo\Config::$CheckNewMessages) if ($iPrevUidNext && $iPrevUidNext != $iCurrentUidNext && 'INBOX' === $sFolderName && \MailSo\Config::$CheckNewMessages)
{ {
$this->oImapClient->FolderSelect($sFolderName); $this->oImapClient->FolderExamine($sFolderName);
$aFetchResponse = $this->oImapClient->Fetch(array( $aFetchResponse = $this->oImapClient->Fetch(array(
\MailSo\Imap\Enumerations\FetchType::INDEX, \MailSo\Imap\Enumerations\FetchType::INDEX,
@ -617,7 +617,7 @@ class MailClient
if ($oRange && \count($oRange)) if ($oRange && \count($oRange))
{ {
$this->oImapClient->FolderSelect($sFolderName); $this->oImapClient->FolderExamine($sFolderName);
$aFetchResponse = $this->oImapClient->Fetch(array( $aFetchResponse = $this->oImapClient->Fetch(array(
\MailSo\Imap\Enumerations\FetchType::INDEX, \MailSo\Imap\Enumerations\FetchType::INDEX,
@ -937,7 +937,7 @@ class MailClient
list($iMessageRealCount, $iMessageUnseenCount, $iUidNext, $iHighestModSeq) = $this->initFolderValues($oParams->sFolderName); list($iMessageRealCount, $iMessageUnseenCount, $iUidNext, $iHighestModSeq) = $this->initFolderValues($oParams->sFolderName);
$this->oImapClient->FolderSelect($oParams->sFolderName); $this->oImapClient->FolderExamine($oParams->sFolderName);
$oMessageCollection = new MessageCollection; $oMessageCollection = new MessageCollection;
$oMessageCollection->FolderName = $oParams->sFolderName; $oMessageCollection->FolderName = $oParams->sFolderName;