CRM_Core_Session::setStatus($result['error_message'], ts('Save Failed'), 'error');
}
- CRM_Core_BAO_ConfigSetting::create($params);
+ //CRM_Core_BAO_ConfigSetting::create($params);
+ $params = CRM_Core_BAO_ConfigSetting::filterSkipVars($params);
+ if (!empty($params)) {
+ CRM_Core_Error::fatal('Unrecognized setting. This may be a config field which has not been properly migrated to a setting. (' . implode(', ', array_keys($params)) . ')');
+ }
CRM_Core_Config::clearDBCache();
CRM_Utils_System::flushCache();
$params = array_merge(unserialize($domain->config_backend), $params);
}
- // unset any of the variables we read from file that should not be stored in the database
- // the username and certpath are stored flat with _test and _live
- // check CRM-1470
- $skipVars = self::skipVars();
- foreach ($skipVars as $var) {
- unset($params[$var]);
- }
+ $params = CRM_Core_BAO_ConfigSetting::filterSkipVars($params);
// also skip all Dir Params, we dont need to store those in the DB!
foreach ($params as $name => $val) {
'qfKey',
'gettextResourceDir',
'cleanURL',
+ 'entryURL',
'locale_custom_strings',
'localeCustomStrings',
'autocompleteContactSearch',
);
}
+ /**
+ * @param array $params
+ * @return array
+ */
+ public static function filterSkipVars($params) {
+ $skipVars = self::skipVars();
+ foreach ($skipVars as $var) {
+ unset($params[$var]);
+ }
+ foreach (array_keys($params) as $key) {
+ if (preg_match('/^_qf_/', $key)) {
+ unset($params[$key]);
+ }
+ }
+ return $params;
+ }
+
}