Example #1
0
 /**
  * Imports a deletion. This may conflict if the local object has been modified
  *
  * @param string        $id
  *
  * @access public
  * @return boolean
  * @throws StatusException
  */
 public function ImportMessageDeletion($id)
 {
     // check for conflicts
     $this->lazyLoadConflicts();
     if ($this->memChanges->IsChanged($id)) {
         ZLog::Write(LOGLEVEL_INFO, sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Conflict detected. Data from Server will be dropped! PIM deleted object.", $id));
     } elseif ($this->memChanges->IsDeleted($id)) {
         ZLog::Write(LOGLEVEL_INFO, sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Conflict detected. Data is already deleted. Request will be ignored.", $id));
         return true;
     }
     // do a 'soft' delete so people can un-delete if necessary
     if (mapi_importcontentschanges_importmessagedeletion($this->importer, 1, array(hex2bin($id)))) {
         throw new StatusException(sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Error updating object: 0x%X", $id, mapi_last_hresult()), SYNC_STATUS_OBJECTNOTFOUND);
     }
     return true;
 }
Example #2
0
 function ImportMessageDeletion($objid)
 {
     // check for conflicts
     $this->_lazyLoadConflicts();
     if ($this->_memChanges->isChanged($objid)) {
         debugLog("Conflict detected. Data from Server will be dropped! PIM deleted object.");
     } elseif ($this->_memChanges->isDeleted($objid)) {
         debugLog("Conflict detected. Data is already deleted. Request will be ignored.");
         return true;
     }
     // do a 'soft' delete so people can un-delete if necessary
     mapi_importcontentschanges_importmessagedeletion($this->importer, 1, array(hex2bin($objid)));
 }
Example #3
0
 function ImportMessageDeletion($objid)
 {
     // check for conflicts
     if ($this->_memChanges->isChanged($objid)) {
         debugLog("Conflict detected. Data from Server will be dropped! PIM deleted object.");
     }
     // do a 'soft' delete so people can un-delete if necessary
     mapi_importcontentschanges_importmessagedeletion($this->importer, 1, array(hex2bin($objid)));
 }
Example #4
0
 function ImportMessageDeletion($objid)
 {
     // do a 'soft' delete so people can un-delete if necessary
     mapi_importcontentschanges_importmessagedeletion($this->importer, 1, array(hex2bin($objid)));
 }
Example #5
0
 /**
  * Imports a deletion. This may conflict if the local object has been modified.
  *
  * @param string        $id
  * @param boolean       $asSoftDelete   (opt) if true, the deletion is exported as "SoftDelete", else as "Remove" - default: false
  *
  * @access public
  * @return boolean
  */
 public function ImportMessageDeletion($id, $asSoftDelete = false)
 {
     list(, $sk) = Utils::SplitMessageId($id);
     // check if the message is in the current syncinterval
     if (!$this->isMessageInSyncInterval($sk)) {
         throw new StatusException(sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Message is outside the sync interval and so far not deleted.", $id), SYNC_STATUS_OBJECTNOTFOUND);
     }
     // check for conflicts
     $this->lazyLoadConflicts();
     if ($this->memChanges->IsChanged($id)) {
         ZLog::Write(LOGLEVEL_INFO, sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Conflict detected. Data from Server will be dropped! PIM deleted object.", $id));
     } elseif ($this->memChanges->IsDeleted($id)) {
         ZLog::Write(LOGLEVEL_INFO, sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Conflict detected. Data is already deleted. Request will be ignored.", $id));
         return true;
     }
     // do a 'soft' delete so people can un-delete if necessary
     if (mapi_importcontentschanges_importmessagedeletion($this->importer, 1, array(hex2bin($sk)))) {
         throw new StatusException(sprintf("ImportChangesICS->ImportMessageDeletion('%s'): Error updating object: 0x%X", $sk, mapi_last_hresult()), SYNC_STATUS_OBJECTNOTFOUND);
     }
     return true;
 }