$fieldsToReturn = array('start_date', 'event_type_id', 'title', 'summary');
$request['params']['return'] = array_unique(array_merge($fieldsToReturn, $request['extra']));
$request['params']['options']['sort'] = 'start_date DESC';
- $request['params'] += array(
- 'is_template' => 0,
- 'is_active' => 1,
- );
+ if (empty($request['params']['id'])) {
+ $request['params'] += array(
+ 'is_template' => 0,
+ 'is_active' => 1,
+ );
+ }
}
/**
* Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_type_getlist_params(&$request) {
- if (!isset($request['params']['is_active'])) {
+ if (!isset($request['params']['is_active']) && empty($request['params']['id'])) {
$request['params']['is_active'] = 1;
}
}