CRM_Utils_JSON::output(array('status' => ($status) ? $oper : $status));
}
+ /**
+ * Retrieve list of duplicate pairs from cache table.
+ */
public static function getDedupes() {
$offset = isset($_REQUEST['start']) ? CRM_Utils_Type::escape($_REQUEST['start'], 'Integer') : 0;
$rowCount = isset($_REQUEST['length']) ? CRM_Utils_Type::escape($_REQUEST['length'], 'Integer') : 25;
CRM_Utils_JSON::output($paperSize);
}
+ /**
+ * Swap contacts in a dupe pair i.e main with duplicate contact.
+ */
public static function flipDupePairs($prevNextId = NULL) {
if (!$prevNextId) {
$prevNextId = $_REQUEST['pnid'];
CRM_Utils_JSON::output($addressVal);
}
+ /**
+ * Mark dupe pairs as selected from un-selected state or vice-versa, in dupe cache table.
+ */
public static function toggleDedupeSelect() {
$rgid = CRM_Utils_Type::escape($_REQUEST['rgid'], 'Integer');
$gid = CRM_Utils_Type::escape($_REQUEST['gid'], 'Integer');
const BATCHLIMIT = 2;
/**
- * Browse all rule groups
+ * Browse batch merges.
*
* @return void
* @access public
return parent::run();
}
+ /**
+ * Build a queue of tasks by dividing dupe pairs in batches.
+ */
public static function getRunner() {
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0);
$gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0);
}
/**
- * Collect Mailchimp data into temporary working table.
+ * Carry out batch merges.
*/
public static function callBatchMerge(CRM_Queue_TaskContext $ctx, $rgid, $gid = NULL, $mode = 'safe', $autoFlip = TRUE, $batchLimit = 1, $isSelected = 2) {
$result = CRM_Dedupe_Merger::batchMerge($rgid, $gid, $mode, $autoFlip, $batchLimit, $isSelected);