public function tearDown()
 {
     unset($this->backend);
     unset($this->ab);
     Utils\Properties::purgeIndexes($this->contactIds);
     parent::tearDown();
 }
Example #2
0
 /**
  * A contact has been deleted and cleanup for property indexes and
  * group/contact relations must be performed.
  *
  * NOTE: When deleting an entire address book the cleanup is done in the
  * addressBookDeletion() hook. Any cleanup procedures most be implemented
  * in both.
  *
  * @param array $parameters Currently only the id of the contact.
  */
 public static function contactDeletion($parameters)
 {
     \OCP\Util::writeLog('contacts', __METHOD__ . ' id: ' . print_r($parameters['id'], true), \OCP\Util::DEBUG);
     $ids = is_array($parameters['id']) ? $parameters['id'] : array($parameters['id']);
     $tagMgr = \OC::$server->getTagManager()->load('contact');
     $tagMgr->purgeObjects($ids);
     Utils\Properties::purgeIndexes($ids);
     // Contact sharing not implemented, but keep for future.
     //\OCP\Share::unshareAll('contact', $id);
 }