projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-15711 - Improve efficiency of deleting a contact
[civicrm-core.git]
/
CRM
/
Contact
/
BAO
/
ProximityQuery.php
diff --git
a/CRM/Contact/BAO/ProximityQuery.php
b/CRM/Contact/BAO/ProximityQuery.php
index 4c1b83b365002c3416a678685a7d290b679c00b4..b5e065df0fa7459126cae5589dd0a9f00ab8562f 100644
(file)
--- a/
CRM/Contact/BAO/ProximityQuery.php
+++ b/
CRM/Contact/BAO/ProximityQuery.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| 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
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-185,6
+185,14
@@
class CRM_Contact_BAO_ProximityQuery {
);
}
);
}
+ /**
+ * @param $latitude
+ * @param $longitude
+ * @param $distance
+ * @param string $tablePrefix
+ *
+ * @return string
+ */
static function where($latitude, $longitude, $distance, $tablePrefix = 'civicrm_address') {
self::initialize();
static function where($latitude, $longitude, $distance, $tablePrefix = 'civicrm_address') {
self::initialize();
@@
-233,6
+241,12
@@
ACOS(
return $where;
}
return $where;
}
+ /**
+ * @param $query
+ * @param $values
+ *
+ * @throws Exception
+ */
static function process(&$query, &$values) {
list($name, $op, $distance, $grouping, $wildcard) = $values;
static function process(&$query, &$values) {
list($name, $op, $distance, $grouping, $wildcard) = $values;
@@
-337,6
+351,9
@@
ACOS(
return;
}
return;
}
+ /**
+ * @param $input
+ */
static function fixInputParams(&$input) {
foreach ($input as $param) {
if (CRM_Utils_Array::value('0', $param) == 'prox_distance') {
static function fixInputParams(&$input) {
foreach ($input as $param) {
if (CRM_Utils_Array::value('0', $param) == 'prox_distance') {