Guest User

Untitled

a guest
Jan 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. Index: v3/Generic.php
  2. ===================================================================
  3. --- v3/Generic.php (revision 36734)
  4. +++ v3/Generic.php (working copy)
  5. @@ -86,3 +86,17 @@
  6. function civicrm_api3_generic_replace($apiRequest) {
  7. return _civicrm_api3_generic_replace($apiRequest['entity'], $apiRequest['params']);
  8. }
  9. +
  10. +
  11. +function civicrm_api3_generic_getdefaults($apiRequest) {
  12. + if($api['action'] == $apiRequest){
  13. + return;
  14. + }
  15. + $defaults = array();
  16. + $result = civicrm_api($apiRequest['entity'],'getfields', $apiRequest['params']);
  17. + foreach ($result['values'] as $field => $values){
  18. + if (CRM_Utils_Array::value('api.required',$values)){
  19. + $defaults[$field] =$values['api.required'];
  20. + }
  21. + }
  22. +}
  23. \ No newline at end of file
  24. Index: v3/Group.php
  25. ===================================================================
  26. --- v3/Group.php (revision 36734)
  27. +++ v3/Group.php (working copy)
  28. @@ -72,6 +72,10 @@
  29.  
  30. }
  31.  
  32. +function _civicrm_api3_group_create_spec($params){
  33. + $params['is_active']['api.default'] = 1;
  34. +}
  35. +
  36. /**
  37. * Returns array of groups matching a set of one or more group properties
  38. *
Add Comment
Please, Sign In to add comment