Fix NC wizard syntax and preserve fallback state

This commit is contained in:
Terranom674
2026-08-18 09:10:55 +02:00
parent d995f6889b
commit b86e066e2a

View File

@@ -344,7 +344,7 @@ function bratonien_tools_nc_wizard_finish()
{ {
$state=bratonien_tools_nc_wizard_state(); $state=bratonien_tools_nc_wizard_state();
if((int)$state['step']!==4||empty($state['technical_complete'])||trim((string)$state['showcase_user'])==='') throw new RuntimeException('Der Assistent ist noch nicht vollständig.'); if((int)$state['step']!==4||empty($state['technical_complete'])||trim((string)$state['showcase_user'])==='') throw new RuntimeException('Der Assistent ist noch nicht vollständig.');
if(array_key_exists('nc_wizard_fallback_user',$_POST))$state['_fallback_user']=trim((string)$_POST['nc_wizard_fallback_user']; if(array_key_exists('nc_wizard_fallback_user',$_POST)) $state['_fallback_user']=trim((string)$_POST['nc_wizard_fallback_user']);
if(array_key_exists('nc_wizard_fallback_password',$_POST)) $state['_fallback_password']=(string)$_POST['nc_wizard_fallback_password']; if(array_key_exists('nc_wizard_fallback_password',$_POST)) $state['_fallback_password']=(string)$_POST['nc_wizard_fallback_password'];
bratonien_tools_nc_wizard_store($state); bratonien_tools_nc_wizard_store($state);
$fallback_user=trim((string)$state['_fallback_user']);$fallback_password=(string)$state['_fallback_password']; $fallback_user=trim((string)$state['_fallback_user']);$fallback_password=(string)$state['_fallback_password'];