Index: branches/5.2.x/core/install.php =================================================================== diff -u -N -r14699 -r14842 --- branches/5.2.x/core/install.php (.../install.php) (revision 14699) +++ branches/5.2.x/core/install.php (.../install.php) (revision 14842) @@ -1,6 +1,6 @@ Array ('check_paths', 'db_config', 'select_license', /*'download_license',*/ 'select_domain', 'root_password', 'choose_modules', 'post_config', 'select_theme', 'security', 'finish'), - 'clean_reinstall' => Array ('check_paths', 'clean_db', 'db_config', 'select_license', /*'download_license',*/ 'select_domain', 'root_password', 'choose_modules', 'post_config', 'select_theme', 'security', 'finish'), + 'fresh_install' => Array ('check_paths', 'db_config', 'select_license', /*'download_license',*/ 'select_domain', 'root_password', 'choose_modules', 'post_config', 'sys_config', 'select_theme', 'security', 'finish'), + 'clean_reinstall' => Array ('check_paths', 'clean_db', 'db_config', 'select_license', /*'download_license',*/ 'select_domain', 'root_password', 'choose_modules', 'post_config', 'sys_config', 'select_theme', 'security', 'finish'), 'already_installed' => Array ('check_paths', 'install_setup'), 'upgrade' => Array ('check_paths', 'install_setup', 'upgrade_modules', 'skin_upgrade', 'security', 'finish'), 'update_license' => Array ('check_paths', 'install_setup', 'select_license', /*'download_license',*/ 'select_domain', 'security', 'finish'), + 'update_config' => Array ('check_paths', 'install_setup', 'sys_config', 'security', 'finish'), 'db_reconfig' => Array ('check_paths', 'install_setup', 'db_reconfig', 'security', 'finish'), - 'fix_paths' => Array ('check_paths', 'install_setup', 'fix_paths', 'security', 'finish'), ); /** @@ -236,12 +236,13 @@ * Returns variable from request * * @param string $name + * @param mixed $default * @return string|bool * @access private */ - private function GetVar($name) + private function GetVar($name, $default = false) { - return array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : false; + return array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : $default; } /** @@ -801,6 +802,18 @@ } break; + case 'sys_config': + $config_data = $this->GetVar('system_config'); + + foreach ($config_data as $section => $section_vars) { + foreach ($section_vars as $var_name => $var_value) { + $this->toolkit->setSystemConfig($section, $var_name, $var_value); + } + } + + $this->toolkit->SaveConfig(); + break; + case 'root_password': // update root password in database $password = md5( md5($this->Application->GetVar('root_password')) . 'b38'); @@ -973,10 +986,6 @@ } break; - case 'fix_paths': - $this->toolkit->saveConfigValues( $this->Application->GetVar('config') ); - break; - case 'finish': // delete cache $this->toolkit->deleteCache();