+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
$location_type_id = CRM_Utils_Array::value('location_type_id', $params, CRM_Utils_Array::value('website_type_id', $params));
$phone_type = CRM_Utils_Array::value('phone_type_id', $params, CRM_Utils_Array::value('phone_type', $params));
- if (!CRM_Core_BAO_UFField::isValidFieldName($field_name)) {
+ if (strpos($field_name, 'formatting') !== 0 && !CRM_Core_BAO_UFField::isValidFieldName($field_name)) {
throw new API_Exception('The field_name is not valid');
}
$params['field_name'] = array($field_type, $field_name, $location_type_id, $phone_type);
'type' => CRM_Utils_Type::T_BOOLEAN,
'api.default' => TRUE,
);
- $params['created_id'] = array(
- 'api.default' => 'user_contact_id',
- 'title' => 'Created By',
- 'type' => CRM_Utils_Type::T_INT,
- );
-
$params['is_active']['api.default'] = TRUE;
}