Fix "message can't be marked seen" (#1427)

This commit is contained in:
RainLoop Team 2017-05-24 19:06:40 +03:00
parent aa2215bf3d
commit 2234212201

View file

@ -1,110 +1,112 @@
<?php <?php
/* /*
* This file is part of MailSo. * This file is part of MailSo.
* *
* (c) 2014 Usenko Timur * (c) 2014 Usenko Timur
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace MailSo\Imap; namespace MailSo\Imap;
/** /**
* @category MailSo * @category MailSo
* @package Imap * @package Imap
*/ */
class FolderInformation class FolderInformation
{ {
/** /**
* @var string * @var string
*/ */
public $FolderName; public $FolderName;
/** /**
* @var bool * @var bool
*/ */
public $IsWritable; public $IsWritable;
/** /**
* @var array * @var array
*/ */
public $Flags; public $Flags;
/** /**
* @var array * @var array
*/ */
public $PermanentFlags; public $PermanentFlags;
/** /**
* @var int * @var int
*/ */
public $Exists; public $Exists;
/** /**
* @var int * @var int
*/ */
public $Recent; public $Recent;
/** /**
* @var string * @var string
*/ */
public $Uidvalidity; public $Uidvalidity;
/** /**
* @var int * @var int
*/ */
public $Unread; public $Unread;
/** /**
* @var string * @var string
*/ */
public $Uidnext; public $Uidnext;
/** /**
* @var string * @var string
*/ */
public $HighestModSeq; public $HighestModSeq;
/** /**
* @access private * @access private
* *
* @param string $sFolderName * @param string $sFolderName
* @param bool $bIsWritable * @param bool $bIsWritable
*/ */
private function __construct($sFolderName, $bIsWritable) private function __construct($sFolderName, $bIsWritable)
{ {
$this->FolderName = $sFolderName; $this->FolderName = $sFolderName;
$this->IsWritable = $bIsWritable; $this->IsWritable = $bIsWritable;
$this->Exists = null; $this->Exists = null;
$this->Recent = null; $this->Recent = null;
$this->Flags = array(); $this->Flags = array();
$this->PermanentFlags = array(); $this->PermanentFlags = array();
$this->Unread = null; $this->Unread = null;
$this->Uidnext = null; $this->Uidnext = null;
$this->HighestModSeq = null; $this->HighestModSeq = null;
} }
/** /**
* @param string $sFolderName * @param string $sFolderName
* @param bool $bIsWritable * @param bool $bIsWritable
* *
* @return \MailSo\Imap\FolderInformation * @return \MailSo\Imap\FolderInformation
*/ */
public static function NewInstance($sFolderName, $bIsWritable) public static function NewInstance($sFolderName, $bIsWritable)
{ {
return new self($sFolderName, $bIsWritable); return new self($sFolderName, $bIsWritable);
} }
/** /**
* @param string $sFlag * @param string $sFlag
* *
* @return bool * @return bool
*/ */
public function IsFlagSupported($sFlag) public function IsFlagSupported($sFlag)
{ {
return \in_array('\\*', $this->PermanentFlags) || \in_array($sFlag, $this->PermanentFlags); return \in_array('\\*', $this->PermanentFlags) ||
} \in_array($sFlag, $this->PermanentFlags) ||
} \in_array($sFlag, $this->Flags);
}
}