X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FSetting.php;h=910e5f90d35ef8df960762b633f88b06399f60ab;hb=3b915aaf8dd3bbf78c516564dfe36dacde40a30e;hp=15c197977d5ae05d8dcc293be537a917bf91f417;hpb=1e66775e6f88ac33d643ca2d68577ab01dd41dd5;p=civicrm-core.git diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 15c197977d..910e5f90d3 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.6 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | + | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2014 + * @copyright CiviCRM LLC (c) 2004-2015 * $Id$ */ @@ -211,12 +211,10 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { // 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 @@ -263,6 +261,11 @@ AND time_format <> '' 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"); }