mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-06 10:39:21 +03:00
logic update...
This commit is contained in:
parent
470cc114b0
commit
5e11d722ad
@ -324,11 +324,11 @@ class Server
|
|||||||
public function numMessages($mailbox='')
|
public function numMessages($mailbox='')
|
||||||
{
|
{
|
||||||
$oldMailbox = $this->getMailBox();
|
$oldMailbox = $this->getMailBox();
|
||||||
$mboxExists = ($this->hasMailbox($mailbox) && $oldMailbox != $mailbox);
|
$mboxExists = ($this->hasMailbox($mailbox) && $oldMailbox !== $mailbox && $mailbox !== '');
|
||||||
if ($mboxExists){
|
if ($mboxExists){
|
||||||
$this->setMailbox($mailbox);
|
$this->setMailbox($mailbox);
|
||||||
}
|
}
|
||||||
$cnt = imap_num_msg($this->getImapStream());
|
$cnt = imap_num_msg( $this->getImapStream() );
|
||||||
if ($mboxExists){
|
if ($mboxExists){
|
||||||
$this->setMailbox($oldMailbox);
|
$this->setMailbox($oldMailbox);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user