From 494608f59898ec683c8ddac0c116bb5878654455 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Mon, 23 Mar 2020 17:42:59 +0100 Subject: [PATCH] webui: refactor restore form element "restore client" construction --- webui/module/Restore/src/Restore/Form/RestoreForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webui/module/Restore/src/Restore/Form/RestoreForm.php b/webui/module/Restore/src/Restore/Form/RestoreForm.php index 1f4610780f8..db668950f5e 100644 --- a/webui/module/Restore/src/Restore/Form/RestoreForm.php +++ b/webui/module/Restore/src/Restore/Form/RestoreForm.php @@ -123,7 +123,7 @@ public function __construct($restore_params=null, $clients=null, $filesets=null, } // Restore client - if(isset($restore_params['restoreclient'])) { + if(isset($this->restore_params['restoreclient'])) { $this->add(array( 'name' => 'restoreclient', 'type' => 'select', @@ -136,11 +136,11 @@ public function __construct($restore_params=null, $clients=null, $filesets=null, 'class' => 'form-control selectpicker show-tick', 'data-live-search' => 'true', 'id' => 'restoreclient', - 'value' => $restore_params['restoreclient'] + 'value' => $this->restore_params['restoreclient'] ) )); } - elseif(!isset($restore_params['restoreclient']) && isset($restore_params['client']) ) { + elseif(!isset($this->restore_params['restoreclient']) && isset($this->restore_params['client']) ) { $this->add(array( 'name' => 'restoreclient', 'type' => 'select', @@ -153,7 +153,7 @@ public function __construct($restore_params=null, $clients=null, $filesets=null, 'class' => 'form-control selectpicker show-tick', 'data-live-search' => 'true', 'id' => 'restoreclient', - 'value' => $restore_params['client'] + 'value' => $this->restore_params['client'] ) )); }