CRM_Core_Component::flushEnabledComponents - Trigger after any change to settings...
authorTim Otten <totten@civicrm.org>
Sat, 23 Nov 2013 06:59:42 +0000 (12:29 +0530)
committerTim Otten <totten@civicrm.org>
Sat, 23 Nov 2013 06:59:42 +0000 (12:29 +0530)
CRM/Case/Info.php
CRM/Core/Component.php
settings/Core.setting.php

index 6d28cc622fa799d02bcd9c25558c987879c78b0e..02bb0e043c933ab43c0394504840329d2a15f5b5 100644 (file)
@@ -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);
index 48046ce8e6c51e478f7d08d63e67cb2798ec9edb..2fbf1468972539df09dccab5a44734fc662bb48f 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Core_Component {
     return self::_info($force);
   }
   
-  static public function &flushEnabledComponents() {
+  static public function flushEnabledComponents() {
        self::getEnabledComponents(TRUE);
   }
 
index b5031dd24f29775c0d1e6676de1643010e55480b..4f1cfc6192a4f3eabb1aa994e756cbe36fcd6818 100644 (file)
@@ -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'),
     ),
   ),