From 353918bc728cfe4f0e62b93fa0b58d7870581c7a Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Fri, 22 Apr 2016 20:28:39 +1200 Subject: [PATCH] Spec function for revert --- api/v3/Logging.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/api/v3/Logging.php b/api/v3/Logging.php index 32bab67c39..c334e6283d 100644 --- a/api/v3/Logging.php +++ b/api/v3/Logging.php @@ -49,6 +49,32 @@ function civicrm_api3_logging_revert($params) { return civicrm_api3_create_success(1); } +/** + * Get a log change. + * + * @param array $params + * + * @throws \API_Exception + * @throws \Civi\API\Exception\UnauthorizedException + */ +function _civicrm_api3_logging_revert_spec(&$params) { + $params['log_conn_id'] = array( + 'title' => 'Logging Connection ID', + 'type' => CRM_Utils_Type::T_STRING, + 'api.required' => TRUE, + ); + $params['log_date'] = array( + 'title' => 'Logging Timestamp', + 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, + ); + $params['interval'] = array( + 'title' => ts('Interval (required if date is included)'), + 'type' => CRM_Utils_Type::T_STRING, + 'api.default' => '10 SECOND', + 'description' => ts('Used when log_date is passed in'), + ); +} + /** * Get a log change. * -- 2.25.1