CRM-21052 - Activity.create API - Abide by setting `civicaseActivityRevisions`
[civicrm-core.git] / api / v3 / CustomGroup.php
index 0a963cf58cc0802b06f8014a5931da7d13375ae4..41df30b555b41216e9693d0754c001ac348b6fab 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -52,7 +52,8 @@ function civicrm_api3_custom_group_create($params) {
     unset($params['extends']);
     $params['extends'] = $extends;
   }
-  if (!isset($params['extends'][0]) || !trim($params['extends'][0])) {
+  if (!isset($params['id']) && (!isset($params['extends'][0]) || !trim($params['extends'][0]))) {
+
     return civicrm_api3_create_error("First item in params['extends'] must be a class name (e.g. 'Contact').");
   }
   if (isset($params['extends_entity_column_value']) && !is_array($params['extends_entity_column_value'])) {