+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
*/
/**
protected $_searchContext;
+ /**
+ * Query object for this selector.
+ *
+ * @var CRM_Contact_BAO_Query
+ */
protected $_query;
+ /**
+ * Get the query object for this selector.
+ *
+ * @return CRM_Contact_BAO_Query
+ */
+ public function getQueryObject() {
+ return $this->_query;
+ }
+
/**
* Group id
*
continue;
}
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($property)) {
- $row[$property] = CRM_Core_BAO_CustomField::getDisplayValue(
+ $row[$property] = CRM_Core_BAO_CustomField::displayValue(
$result->$property,
$cfID,
- $this->_options,
$result->contact_id
);
}
public function contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') {
$sortOrder = &$this->getSortOrder($this->_action);
$sort = new CRM_Utils_Sort($sortOrder, $sortID);
+ $includeOrderByClause = Civi::settings()->get('includeOrderByClause');
+ $returnProperties = CRM_Contact_BAO_Query::NO_RETURN_PROPERTIES;
+ if ($includeOrderByClause) {
+ $returnProperties = $this->_returnProperties;
+ }
// rectify params to what proximity search expects if there is a value for prox_distance
// CRM-7021 CRM-7905
if (!$displayRelationshipType) {
$query = new CRM_Contact_BAO_Query($params,
- $this->_returnProperties,
+ $returnProperties,
NULL, FALSE, FALSE, 1,
FALSE, TRUE, TRUE, NULL,
$queryOperator
);
}
else {
- $query = new CRM_Contact_BAO_Query($params, $this->_returnProperties,
+ $query = new CRM_Contact_BAO_Query($params,
+ $returnProperties,
NULL, FALSE, FALSE, 1,
FALSE, TRUE, TRUE, $displayRelationshipType,
$queryOperator