}
$newParams = CRM_Contact_BAO_Query::convertFormValues($inputParams);
+ foreach ($newParams as &$newParam) {
+ if($newParam[1] == '=' && is_array($newParam[2])) {
+ // we may be looking at an attempt to use the 'IN' style syntax
+ // @todo at time of writing only 'IN' & 'NOT IN' are supported for the array style syntax
+ $sqlFilter = CRM_Core_DAO::createSqlFilter($newParam[0], $params[$newParam[0]], 'String', NULL, TRUE);
+ if($sqlFilter) {
+ $newParam[1] = key($newParam[2]);
+ $newParam[2] = $sqlFilter;
+ }
+ }
+
+ }
$skipPermissions = CRM_Utils_Array::value('check_permissions', $params)? 0 :1;
+
list($entities, $options) = CRM_Contact_BAO_Query::apiQuery(
$newParams,
$returnProperties,
'File' => CRM_Utils_Type::T_STRING,
'Link' => CRM_Utils_Type::T_STRING,
'ContactReference' => CRM_Utils_Type::T_INT,
+ 'Country' => CRM_Utils_Type::T_INT,
);
return $mapping[$dataType];
}
function _civicrm_api3_getdefaults($apiRequest) {
$defaults = array();
- $result = civicrm_api($apiRequest['entity'],
+ $result = civicrm_api3($apiRequest['entity'],
'getfields',
array(
- 'version' => 3,
'action' => $apiRequest['action'],
)
);
}
return;
}
- $result = civicrm_api($apiRequest['entity'],
+ $result = civicrm_api3($apiRequest['entity'],
'getfields',
array(
- 'version' => 3,
'action' => $apiRequest['action'],
)
);