Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: v3/Generic.php
- ===================================================================
- --- v3/Generic.php (revision 36734)
- +++ v3/Generic.php (working copy)
- @@ -86,3 +86,17 @@
- function civicrm_api3_generic_replace($apiRequest) {
- return _civicrm_api3_generic_replace($apiRequest['entity'], $apiRequest['params']);
- }
- +
- +
- +function civicrm_api3_generic_getdefaults($apiRequest) {
- + if($api['action'] == $apiRequest){
- + return;
- + }
- + $defaults = array();
- + $result = civicrm_api($apiRequest['entity'],'getfields', $apiRequest['params']);
- + foreach ($result['values'] as $field => $values){
- + if (CRM_Utils_Array::value('api.required',$values)){
- + $defaults[$field] =$values['api.required'];
- + }
- + }
- +}
- \ No newline at end of file
- Index: v3/Group.php
- ===================================================================
- --- v3/Group.php (revision 36734)
- +++ v3/Group.php (working copy)
- @@ -72,6 +72,10 @@
- }
- +function _civicrm_api3_group_create_spec($params){
- + $params['is_active']['api.default'] = 1;
- +}
- +
- /**
- * Returns array of groups matching a set of one or more group properties
- *
Add Comment
Please, Sign In to add comment