$to = CRM_Utils_Request::retrieve($name . '_to', 'String', $this);
$value = array();
if ($from && $to) {
- $value['from'] = $from;
- $value['to'] = $to;
+ $value[$name . '_from'] = $from;
+ $value[$name . '_to'] = $to;
}
elseif ($from) {
- $value['from'] = $from;
+ $value[$name . '_from'] = $from;
}
elseif ($to) {
- $value['to'] = $to;
+ $value[$name . '_to'] = $to;
}
}
elseif ((substr($name, 0, 7) == 'custom_') &&
if ($operator) {
$this->_params[$name . '_operator'] = $operator;
}
- $this->_params[$name] = $this->_fields[$name]['value'] = $value;
+ if ((substr($name, 0, 6) == 'custom') && !empty($field['is_search_range'])) {
+ $this->_params += $value;
+ }
+ else {
+ $this->_params[$name] = $this->_fields[$name]['value'] = $value;
+ }
}
}