Fix for CRM-14990: allow is_reserved field on CustomGroup to be set during create.
authorFrank J. Gómez <frank@ginkgostreet.com>
Tue, 15 Jul 2014 15:38:14 +0000 (11:38 -0400)
committerFrank J. Gómez <frank@ginkgostreet.com>
Tue, 15 Jul 2014 15:38:14 +0000 (11:38 -0400)
CRM/Core/BAO/CustomGroup.php

index ccc7225be6685714a2431fd42d2030285891e192..33c05c199b32fb75f5ff158aa6b1c366aacccc52 100644 (file)
@@ -160,6 +160,14 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup {
       }
     }
 
+    $is_reserved = CRM_Utils_Array::value('is_reserved', $params, 0);
+    if (in_array($is_reserved, array(TRUE, 1, '1'), TRUE)) {
+      $is_reserved = 1;
+    } else {
+      $is_reserved = 0;
+    }
+    $group->is_reserved = $is_reserved;
+
     // enclose the below in a transaction
     $transaction = new CRM_Core_Transaction();