/** * @param WebMailMessage $message * @param Folder $folder * @return bool */ function UpdateMessage(&$message, &$folder) { if ($message == null || $folder == null) { return false; } switch ($this->_account->MailProtocol) { case MAILPROTOCOL_POP3: $result = true; $size = $this->DbStorage->MessageSize($message, $folder); if ($size > -1) { $mailBoxesSize = $this->DbStorage->SelectMailboxesSize() - $size + $message->GetMailSize(); if ($this->MailStorage->_settings->EnableMailboxSizeLimit && $this->_account->MailboxLimit < $mailBoxesSize) { setGlobalError(ErrorGetMailLimit); return false; } $result &= $this->DbStorage->UpdateMessage($message, $folder); } else { $message->IdMsg = $this->DbStorage->SelectLastIdMsg() + 1; $result &= $this->DbStorage->SaveMessage($message, $folder); } return $result; break; default: return $this->SaveMessage($message, $folder); break; } return false; }