Spec function for revert
authoreileenmcnaugton <eileen@fuzion.co.nz>
Fri, 22 Apr 2016 08:28:39 +0000 (20:28 +1200)
committerEileen <eileen@fuzion.co.nz>
Sat, 23 Apr 2016 03:51:17 +0000 (03:51 +0000)
api/v3/Logging.php

index 32bab67c39fa87562a8bd24dbc9b870575272add..c334e6283dcabb78076d5ba3e8d5ca9ea831c5fd 100644 (file)
@@ -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.
  *