Exemplo n.º 1
0
 function SetFlag(&$messageIdUid, &$folder, $flags, $action)
 {
     $messageIdSet = null;
     $messageUidSet = null;
     if ($messageIdUid != null) {
         $messageIdSet = array_keys($messageIdUid);
         $messageUidSet = array_values($messageIdUid);
     }
     $result = true;
     if ($folder->SyncType != FOLDERSYNC_DirectMode) {
         if ($this->DbStorage->Connect()) {
             $result &= $this->DbStorage->SetMessagesFlags($messageIdSet, false, $folder, $flags, $action);
         }
     }
     if ($folder->SyncType != FOLDERSYNC_DontSync && $this->_account->MailProtocol != MAILPROTOCOL_POP3) {
         if (count($messageUidSet) == 1 && $this->MailStorage->Connect()) {
             $result &= $this->MailStorage->SetMessagesFlag($messageUidSet[0], $folder, $flags, $action);
         }
     }
     return $result;
 }