Ensure Dashboard domain ID is set even when passed as a param
authorChristian Wach <needle@haystack.co.uk>
Wed, 11 Sep 2019 12:20:44 +0000 (13:20 +0100)
committerChristian Wach <needle@haystack.co.uk>
Wed, 11 Sep 2019 12:20:44 +0000 (13:20 +0100)
CRM/Core/BAO/Dashboard.php

index 8eef1432321fb40c383683ca6df78d6188f518c4..2c89838c40ba87704ecba71db6d9e47488704c43 100644 (file)
@@ -394,6 +394,9 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
       if (empty($params['domain_id'])) {
         $dashlet->domain_id = CRM_Core_Config::domainID();
       }
+      else {
+        $dashlet->domain_id = CRM_Utils_Array::value('domain_id', $params);
+      }
 
       // Try and find an existing dashlet - it will be updated if found.
       if (!empty($params['name'])) {