fix problem with AlterPingChanges with non selectable folders

This commit is contained in:
Klaus Leithoff 2016-10-25 11:39:23 +00:00
parent 910b92acca
commit dbc31d5ccb

View File

@ -1783,6 +1783,12 @@ class mail_zpush implements activesync_plugin_write, activesync_plugin_sendmail,
if ($type != 'mail') return false; if ($type != 'mail') return false;
if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true); if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
if (!$this->mail->folderIsSelectable($folder))
{
ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.": could not select folder $folder returning fake state");
$syncstate = "M:".'0'."-R:".'0'."-U:".'0'."-NUID:".'0'."-UIDV:".'0';
return array();
}
$this->mail->reopen($folder); $this->mail->reopen($folder);