mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-26 09:03:48 +08:00
Resolve #1354
This commit is contained in:
parent
6d58b1efb5
commit
9d7f93f304
2 changed files with 11 additions and 7 deletions
|
@ -72,7 +72,7 @@ trait ACL
|
|||
{
|
||||
// if ($this->ACLAllow($sFolderName, 'SETACL')) {
|
||||
$this->SendRequestGetResponse('SETACL', array(
|
||||
$this->EscapeString($sFolderName),
|
||||
$this->EscapeFolderName($sFolderName),
|
||||
$this->EscapeString($sIdentifier),
|
||||
$this->EscapeString($sAccessRights)
|
||||
));
|
||||
|
@ -82,7 +82,7 @@ trait ACL
|
|||
{
|
||||
// if ($this->ACLAllow($sFolderName, 'DELETEACL')) {
|
||||
$this->SendRequestGetResponse('DELETEACL', array(
|
||||
$this->EscapeString($sFolderName),
|
||||
$this->EscapeFolderName($sFolderName),
|
||||
$this->EscapeString($sIdentifier)
|
||||
));
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ trait ACL
|
|||
public function FolderGetACL(string $sFolderName) : array
|
||||
{
|
||||
// if ($this->ACLAllow($sFolderName, 'GETACL')) {
|
||||
$oResponses = $this->SendRequestGetResponse('GETACL', array($this->EscapeString($sFolderName)));
|
||||
$oResponses = $this->SendRequestGetResponse('GETACL', array($this->EscapeFolderName($sFolderName)));
|
||||
$aResult = array();
|
||||
foreach ($oResponses as $oResponse) {
|
||||
if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
|
||||
|
@ -109,7 +109,7 @@ trait ACL
|
|||
{
|
||||
// if ($this->ACLAllow($sFolderName, 'LISTRIGHTS')) {
|
||||
$oResponses = $this->SendRequestGetResponse('LISTRIGHTS', array(
|
||||
$this->EscapeString($sFolderName),
|
||||
$this->EscapeFolderName($sFolderName),
|
||||
$this->EscapeString($sIdentifier)
|
||||
));
|
||||
foreach ($oResponses as $oResponse) {
|
||||
|
@ -130,7 +130,7 @@ trait ACL
|
|||
{
|
||||
// if ($this->ACLAllow($sFolderName, 'MYRIGHTS')) {
|
||||
// if ($this->hasCapability('ACL')) {
|
||||
$oResponses = $this->SendRequestGetResponse('MYRIGHTS', array($this->EscapeString($sFolderName)));
|
||||
$oResponses = $this->SendRequestGetResponse('MYRIGHTS', array($this->EscapeFolderName($sFolderName)));
|
||||
foreach ($oResponses as $oResponse) {
|
||||
if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
|
||||
&& isset($oResponse->ResponseList[3])
|
||||
|
|
|
@ -565,7 +565,7 @@ trait Folders
|
|||
if ($bMetadata && !$aMetadata /*&& 50 < $oFolderCollection->count()*/) {
|
||||
foreach ($oFolderCollection as $oFolder) {
|
||||
// if (2 > \substr_count($oFolder->FullName, $oFolder->Delimiter()))
|
||||
try {
|
||||
if ($oFolder->Selectable()) try {
|
||||
$oFolder->SetAllMetadata(
|
||||
$this->getMetadata($oFolder->FullName, ['/shared', '/private'], ['DEPTH'=>'infinity'])
|
||||
);
|
||||
|
@ -577,7 +577,11 @@ trait Folders
|
|||
|
||||
if ($this->hasCapability('ACL') || $this->CapabilityValue('RIGHTS')) {
|
||||
foreach ($oFolderCollection as $oFolder) {
|
||||
$oFolder->myRights = $this->FolderMyRights($oFolder->FullName);
|
||||
if ($oFolder->Selectable()) try {
|
||||
$oFolder->myRights = $this->FolderMyRights($oFolder->FullName);
|
||||
} catch (\Throwable $oException) {
|
||||
// Ignore error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue