Update to latest versions of polyfill-ctype and polyfill-iconv
[civicrm-core.git] / api / v3 / Job.php
index 0c28926fe3006132679a2f7ba0a791c53103a852..4a4b0eca75f0729fd2e85161aed74c5d67015b2c 100644 (file)
@@ -228,6 +228,7 @@ function civicrm_api3_job_send_reminder($params) {
     return civicrm_api3_create_error($result['messages']);
   }
 }
+
 /**
  * Adjust metadata for "send_reminder" action.
  *
@@ -244,6 +245,7 @@ function _civicrm_api3_job_send_reminder(&$params) {
     'title' => 'Action Schedule ID',
   ];
 }
+
 /**
  * Execute a specific report instance and send the output via email.
  *
@@ -464,7 +466,6 @@ function civicrm_api3_job_process_participant($params) {
   }
 }
 
-
 /**
  * This api checks and updates the status of all membership records for a given domain.
  *
@@ -540,7 +541,7 @@ function civicrm_api3_job_process_batch_merge($params) {
   $gid = CRM_Utils_Array::value('gid', $params);
   $mode = CRM_Utils_Array::value('mode', $params, 'safe');
 
-  $result = CRM_Dedupe_Merger::batchMerge($rule_group_id, $gid, $mode, 1, 2, CRM_Utils_Array::value('criteria', $params, []), CRM_Utils_Array::value('check_permissions', $params));
+  $result = CRM_Dedupe_Merger::batchMerge($rule_group_id, $gid, $mode, 1, 2, CRM_Utils_Array::value('criteria', $params, []), CRM_Utils_Array::value('check_permissions', $params), NULL, $params['search_limit']);
 
   return civicrm_api3_create_success($result, $params);
 }
@@ -570,6 +571,12 @@ function _civicrm_api3_job_process_batch_merge_spec(&$params) {
     'description' => 'let the api decide which contact to retain and which to delete?',
     'type' => CRM_Utils_Type::T_BOOLEAN,
   ];
+  $params['search_limit'] = [
+    'title' => ts('Number of contacts to look for matches for.'),
+    'type' => CRM_Utils_Type::T_INT,
+    'api.default' => (int) Civi::settings()->get('dedupe_default_limit'),
+  ];
+
 }
 
 /**