* Setup: config changed in setup did not update instance cache and was therefore not immediatly available

This commit is contained in:
Ralf Becker 2014-07-04 12:43:11 +00:00
parent d399e01ce8
commit 5241d3c951

View File

@ -90,22 +90,9 @@ if(@get_var('submit',Array('POST')) && @$newsettings)
$value = $newsettings[$setting]; // it might be changed by the validation hook $value = $newsettings[$setting]; // it might be changed by the validation hook
} }
/* Don't erase passwords, since we also do not print them below */ /* Don't erase passwords, since we also do not print them below */
if(empty($value) && !(stristr($setting,'passwd') || stristr($setting,'password') || stristr($setting,'root_pw'))) if(!empty($value) || !(stristr($setting,'passwd') || stristr($setting,'password') || stristr($setting,'root_pw')))
{ {
$GLOBALS['egw_setup']->db->delete($GLOBALS['egw_setup']->config_table,array( config::save_value($setting, $value, 'phpgwapi');
'config_name' => $setting,
'config_app' => 'phpgwapi',
),__LINE__,__FILE__);
unset($newsettings[$setting]);
}
elseif($value)
{
$GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array(
'config_value' => $value,
),array(
'config_name' => $setting,
'config_app' => 'phpgwapi',
),__LINE__,__FILE__);
} }
} }
if(!$GLOBALS['error']) if(!$GLOBALS['error'])