$values['contribution_date_low'] = $date['from'];
$values['contribution_date_high'] = $date['to'];
}
- $searchParams = CRM_Contact_BAO_Query::convertFormValues($values);
- // @todo the use of defaultReturnProperties means the search will be inefficient
- // as slow-unneeded properties are included.
- $query = new CRM_Contact_BAO_Query($searchParams,
- CRM_Contribute_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_CONTRIBUTE,
- FALSE
- ), NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_CONTRIBUTE
- );
- if ($field == 'contribution_date_high' || $field == 'contribution_date_low') {
- $query->dateQueryBuilder($params[$field], 'civicrm_contribution', 'contribution_date', 'receive_date', 'Contribution Date');
- }
}
}
+
+ $searchParams = CRM_Contact_BAO_Query::convertFormValues($values);
+ // @todo the use of defaultReturnProperties means the search will be inefficient
+ // as slow-unneeded properties are included.
+ $query = new CRM_Contact_BAO_Query($searchParams,
+ CRM_Contribute_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_CONTRIBUTE,
+ FALSE
+ ), NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_CONTRIBUTE
+ );
+
if (!empty($query->_where[0])) {
$where = implode(' AND ', $query->_where[0]) .
" AND civicrm_entity_batch.batch_id IS NULL ";