+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*/
// save components to be enabled
if (array_key_exists('enableComponents', $params)) {
- CRM_Core_BAO_Setting::setItem($params['enableComponents'],
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components');
-
- // unset params by emptying the values, so while retrieving we can detect and load from settings table
- // instead of config-backend for backward compatibility. We could use unset() in later releases.
- $params['enableComponents'] = $params['enableComponentIDs'] = array();
+ civicrm_api3('setting', 'create', array(
+ 'enable_components' => $params['enableComponents'],
+ ));
+ unset($params['enableComponents']);
}
// save checksum timeout
unset($params[$setting]);
}
CRM_Core_BAO_ConfigSetting::create($params);
+
+ CRM_Core_Config::clearDBCache();
+ CRM_Utils_System::flushCache();
+ CRM_Core_Resources::singleton()->resetCacheCode();
+
CRM_Core_Session::setStatus(" ", ts('Changes Saved'), "success");
}