/** * Get a log change. * * @param array $params * * @return array * API Success Array * @throws \API_Exception * @throws \Civi\API\Exception\UnauthorizedException */ function civicrm_api3_logging_get($params) { $schema = new CRM_Logging_Schema(); $interval = empty($params['log_date']) ? NULL : $params['interval']; $differ = new CRM_Logging_Differ($params['log_conn_id'], CRM_Utils_Array::value('log_date', $params), $interval); return civicrm_api3_create_success($differ->getAllChangesForConnection($schema->getLogTablesForContact())); }
/** * Get an array of changes made in the mysql connection. * * @return mixed */ public function getAllContactChangesForConnection() { if (empty($this->log_conn_id)) { return array(); } $this->setDiffer(); try { return $this->differ->getAllChangesForConnection($this->tables); } catch (CRM_Core_Exception $e) { CRM_Core_Error::statusBounce(ts($e->getMessage())); } }