Commit b572ba7a authored by colemanw's avatar colemanw

Merge pull request #8004 from PalanteJon/CRM-18264

CRM-18264 - Fix potential upgrade crash when adding Getting Started d…
parents e1b78a19 429da6a1
......@@ -297,7 +297,7 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base
// Add default position for Getting Started Dashlet ( left column)
$sql = "INSERT INTO `civicrm_dashboard_contact` (dashboard_id, contact_id, column_no, is_active)
SELECT (SELECT MAX(id) FROM `civicrm_dashboard`), contact_id, 0, IF (SUM(is_active) > 0, 1, 0)
FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id";
FROM `civicrm_dashboard_contact` JOIN `civicrm_contact` WHERE civicrm_dashboard_contact.contact_id = civicrm_contact.id GROUP BY contact_id";
CRM_Core_DAO::executeQuery($sql);
}
return TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment