mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 14:04:34 +00:00
Fix NC wizard syntax and preserve fallback state
This commit is contained in:
@@ -344,8 +344,8 @@ 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'];
|
||||||
if(($fallback_user==='')!==($fallback_password==='')) throw new RuntimeException('Fallback-Benutzer und Fallback-Passwort müssen entweder beide angegeben oder beide leer gelassen werden.');
|
if(($fallback_user==='')!==($fallback_password==='')) throw new RuntimeException('Fallback-Benutzer und Fallback-Passwort müssen entweder beide angegeben oder beide leer gelassen werden.');
|
||||||
|
|||||||
Reference in New Issue
Block a user