function SetHide(&$folder, $isHide) { $result = true; if ($this->_account->MailProtocol == MAILPROTOCOL_IMAP4 && $folder->SyncType != FOLDERSYNC_DontSync && $folder->Type != FOLDERTYPE_Inbox) { $result &= $this->MailStorage->Connect() && $this->MailStorage->SubscribeFolder($folder, $isHide); } return $result; }