From: Tim Otten Date: Sat, 23 Nov 2013 06:59:42 +0000 (+0530) Subject: CRM_Core_Component::flushEnabledComponents - Trigger after any change to settings... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b516fae19299807659c6d30c7e30a60071873602;p=civicrm-core.git CRM_Core_Component::flushEnabledComponents - Trigger after any change to settings (not just CiviCase activation) --- diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index 6d28cc622f..02bb0e043c 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -172,7 +172,6 @@ class CRM_Case_Info extends CRM_Core_Component_Info { $config = CRM_Core_Config::singleton(); CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $config->sqlDir . 'case_sample.mysql'); CRM_Admin_Form_Setting_Component::loadCaseSampleData($config->dsn, $config->sqlDir . 'case_sample1.mysql'); - CRM_Core_Component::flushEnabledComponents(); if (!CRM_Case_BAO_Case::createCaseViews()) { $msg = ts("Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission"); CRM_Core_Error::fatal($msg); diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index 48046ce8e6..2fbf146897 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -99,7 +99,7 @@ class CRM_Core_Component { return self::_info($force); } - static public function &flushEnabledComponents() { + static public function flushEnabledComponents() { self::getEnabledComponents(TRUE); } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index b5031dd24f..4f1cfc6192 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -627,7 +627,8 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => null, 'help_text' => null, 'on_change' => array( - array('CRM_Case_Info', 'onToggleComponents') + array('CRM_Case_Info', 'onToggleComponents'), + array('CRM_Core_Component', 'flushEnabledComponents'), ), ),