projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pass cachekey around more & criteria less
[civicrm-core.git]
/
CRM
/
Contact
/
Page
/
AJAX.php
diff --git
a/CRM/Contact/Page/AJAX.php
b/CRM/Contact/Page/AJAX.php
index 09f396b4da2ab5d94d264a5849b4234017b1b536..af6fdae49853fc22f060a285d716c802aef7dbea 100644
(file)
--- a/
CRM/Contact/Page/AJAX.php
+++ b/
CRM/Contact/Page/AJAX.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version
4.7
|
+ | CiviCRM version
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
7
|
+ | Copyright CiviCRM LLC (c) 2004-201
8
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
7
+ * @copyright CiviCRM LLC (c) 2004-201
8
*
*/
*
*/
@@
-261,9
+261,12
@@
class CRM_Contact_Page_AJAX {
}
// Save activity only for the primary (first) client
if ($i == 0 && empty($result['is_error'])) {
}
// Save activity only for the primary (first) client
if ($i == 0 && empty($result['is_error'])) {
- CRM_Case_BAO_Case::createCaseRoleActivity($caseID, $result['id'], $relContactID);
+ CRM_Case_BAO_Case::createCaseRoleActivity($caseID, $result['id'], $relContactID
, $sourceContactID
);
}
}
}
}
+ if (!empty($_REQUEST['is_unit_test'])) {
+ return $ret;
+ }
CRM_Utils_JSON::output($ret);
}
CRM_Utils_JSON::output($ret);
}
@@
-646,13
+649,16
@@
LIMIT {$offset}, {$rowCount}
$gid = CRM_Utils_Request::retrieve('gid', 'Positive');
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive');
$gid = CRM_Utils_Request::retrieve('gid', 'Positive');
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive');
- $selected = isset($_REQUEST['selected']) ? CRM_Utils_Type::escape($_REQUEST['selected'], 'Integer') : 0;
+ $null = NULL;
+ $criteria = CRM_Utils_Request::retrieve('criteria', 'Json', $null, FALSE, '{}');
+ $selected = CRM_Utils_Request::retrieveValue('selected', 'Boolean');
if ($rowCount < 0) {
$rowCount = 0;
}
$whereClause = $orderByClause = '';
if ($rowCount < 0) {
$rowCount = 0;
}
$whereClause = $orderByClause = '';
- $cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid);
+ $cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, json_decode($criteria, TRUE));
+
$searchRows = array();
$searchParams = self::getSearchOptionsFromRequest();
$searchRows = array();
$searchParams = self::getSearchOptionsFromRequest();
@@
-814,6
+820,7
@@
LIMIT {$offset}, {$rowCount}
'oid' => $pairInfo['entity_id2'],
'action' => 'update',
'rgid' => $rgid,
'oid' => $pairInfo['entity_id2'],
'action' => 'update',
'rgid' => $rgid,
+ 'criteria' => $criteria,
'limit' => CRM_Utils_Request::retrieve('limit', 'Integer'),
];
if ($gid) {
'limit' => CRM_Utils_Request::retrieve('limit', 'Integer'),
];
if ($gid) {
@@
-1010,12
+1017,9
@@
LIMIT {$offset}, {$rowCount}
* Mark dupe pairs as selected from un-selected state or vice-versa, in dupe cache table.
*/
public static function toggleDedupeSelect() {
* 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');
$pnid = $_REQUEST['pnid'];
$isSelected = CRM_Utils_Type::escape($_REQUEST['is_selected'], 'Boolean');
$pnid = $_REQUEST['pnid'];
$isSelected = CRM_Utils_Type::escape($_REQUEST['is_selected'], 'Boolean');
-
- $cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid);
+ $cacheKeyString = CRM_Utils_Request::retrieve('cacheKey', 'Alphanumeric', $null, FALSE);
$params = array(
1 => array($isSelected, 'Boolean'),
$params = array(
1 => array($isSelected, 'Boolean'),