From b86e066e2a0100cb94e90291b16b883899f9b454 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Tue, 18 Aug 2026 09:10:55 +0200 Subject: [PATCH] Fix NC wizard syntax and preserve fallback state --- include/nc_connector_wizard.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nc_connector_wizard.inc.php b/include/nc_connector_wizard.inc.php index 7772afa..e51dfe1 100644 --- a/include/nc_connector_wizard.inc.php +++ b/include/nc_connector_wizard.inc.php @@ -344,8 +344,8 @@ function bratonien_tools_nc_wizard_finish() { $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(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_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']; bratonien_tools_nc_wizard_store($state); $fallback_user=trim((string)$state['_fallback_user']);$fallback_password=(string)$state['_fallback_password']; if(($fallback_user==='')!==($fallback_password==='')) throw new RuntimeException('Fallback-Benutzer und Fallback-Passwort müssen entweder beide angegeben oder beide leer gelassen werden.');