CRM_Core_BAO_Setting::dao() - Don't filter on group, but do save a blank group.
authorTim Otten <totten@civicrm.org>
Thu, 27 Aug 2015 23:01:08 +0000 (16:01 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:02 +0000 (15:45 -0700)
CRM/Core/BAO/Setting.php

index 72a4aaaba8ce87b4ee51e24b3c0b6c2ca3d4afdc..4f0b8f7838353a8326f5ff7ac88a868516802dab 100644 (file)
@@ -176,7 +176,9 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
     }
     $dao = new CRM_Core_DAO_Setting();
 
-    $dao->group_name = $group;
+    if (!empty($group)) {
+      $dao->group_name = $group;
+    }
     $dao->name = $name;
     $dao->component_id = $componentID;
     if (empty($domainID)) {
@@ -370,6 +372,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
 
     $dao = self::dao($group, $name, $componentID, $contactID, $domainID);
     $dao->find(TRUE);
+    $dao->group_name = $group;
 
     if (isset($metadata['on_change'])) {
       foreach ($metadata['on_change'] as $callback) {