}
//end of function
+ /**
+ * @param null $action
+ * @param null $output
+ *
+ * @return array
+ */
function &getColHeads($action = NULL, $output = NULL) {
$colHeads = self::_getColumnHeaders();
$colHeads[] = array('desc' => ts('Actions'), 'name' => ts('Action'));
return $rows;
}
+ /**
+ * @param $sort
+ *
+ * @return string
+ */
function buildPrevNextCache($sort) {
$cacheKey = 'civicrm search ' . $this->_key;
return $cacheKey;
}
+ /**
+ * @param $rows
+ */
function addActions(&$rows) {
$config = CRM_Core_Config::singleton();
}
}
+ /**
+ * @param $rows
+ */
function removeActions(&$rows) {
foreach ($rows as $rid => & $rValue) {
unset($rValue['contact_type']);
// build insert query, note that currently we build cache for 500 contact records at a time, hence below approach
$insertValues = array();
while($dao->fetch()) {
- $insertValues[] = "('civicrm_contact', {$dao->contact_id}, {$dao->contact_id}, '{$cacheKey}', '{$dao->sort_name}')";
+ $insertValues[] = "('civicrm_contact', {$dao->contact_id}, {$dao->contact_id}, '{$cacheKey}', '" . CRM_Core_DAO::escapeString($dao->sort_name) . "')";
}
//update pre/next cache using single insert query
return self::$_columnHeaders;
}
+ /**
+ * @return CRM_Contact_BAO_Query
+ */
function &getQuery() {
return $this->_query;
}
+ /**
+ * @return CRM_Contact_DAO_Contact
+ */
function alphabetQuery() {
return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE);
}
+ /**
+ * @param $params
+ * @param $action
+ * @param $sortID
+ * @param null $displayRelationshipType
+ * @param string $queryOperator
+ *
+ * @return CRM_Contact_DAO_Contact
+ */
function contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') {
$sortOrder = &$this->getSortOrder($this->_action);
$sort = new CRM_Utils_Sort($sortOrder, $sortID);
return $value;
}
+ /**
+ * @param $returnProperties
+ *
+ * @return array
+ */
function &makeProperties(&$returnProperties) {
$properties = array();
foreach ($returnProperties as $name => $value) {