/** * delete contentstate (aka: forget that we have sent the entry to the client) * * @param string $_class the class from the xml * @param string $_collectionId the collection id from the xml * @param string $_contentId the Tine 2.0 id of the entry */ public function markContentStateAsDeleted(ActiveSync_Model_ContentState $_state) { $contentStateFilter = new ActiveSync_Model_ContentStateFilter(array(array('field' => 'device_id', 'operator' => 'equals', 'value' => $_state->device_id instanceof ActiveSync_Model_Device ? $_state->device_id->getId() : $_state->device_id), array('field' => 'class', 'operator' => 'equals', 'value' => $_state->class), array('field' => 'collectionid', 'operator' => 'equals', 'value' => $_state->collectionid), array('field' => 'contentid', 'operator' => 'equals', 'value' => $_state->contentid))); $state = $this->_contentStateBackend->search($contentStateFilter)->getFirstRecord(); if ($state != null) { $state->is_deleted = 1; $this->_contentStateBackend->update($state); } else { if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) { Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . " no contentstate found for " . print_r($contentStateFilter->toArray(), true)); } } }