<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
$this->_search = new $customSearchClass( $formValues );
}
else {
- $customSearchFile = $ext->keyToPath($customSearchClass, 'search');
- $this->_search = new $ext->keyToClass($customSearchClass, 'search')( $formValues );
+ $fnName = $ext->keyToPath;
+ $customSearchFile = $fnName($customSearchClass, 'search');
+ $className = $ext->keyToClass($customSearchClass, 'search');
+ $this->_search = new $className($formValues);
}
}
//end of constructor
}
$sql = $this->_search->all($offset, $rowCount, $sort, $includeContactIDs);
+ // contact query object used for creating $sql
+ $contactQueryObj = NULL;
+ if (method_exists($this->_search, 'getQueryObj') &&
+ is_a($this->_search->getQueryObj(), 'CRM_Contact_BAO_Query')) {
+ $contactQueryObj = $this->_search->getQueryObj();
+ }
$dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
$row = array();
$empty = TRUE;
+ // if contact query object present
+ // process pseudo constants
+ if ($contactQueryObj) {
+ $contactQueryObj->convertToPseudoNames($dao);
+ }
+
// the columns we are interested in
foreach ($columnNames as $property) {
$row[$property] = $dao->$property;