Code and Cosmetic changes, some PHP8.x warning fixes

This commit is contained in:
JRGTH
2022-08-29 10:53:40 -04:00
parent a3829b1d3f
commit 010f964e36
8 changed files with 87 additions and 49 deletions

View File

@@ -95,8 +95,9 @@ $is_linux_jail = exec("/usr/bin/grep linsysfs {$jail_dir}/{$jail_name_def}/fstab
if ($_POST):
global $configfile;
unset($savemsg);
unset($input_errors);
global $is_changed;
//unset($savemsg);
//unset($input_errors);
$pconfig = $_POST;
// Return to index.
@@ -161,15 +162,33 @@ if ($_POST):
if(isset($_POST['Submit']) && $_POST['Submit']):
// Set current config values.
$jail_name = $pconfig['jname'];
$jail_hostname = $pconfig['hostname'];
$jail_ipv4 = $pconfig['ipv4'];
$jail_ipv6 = $pconfig['ipv6'];
$jail_interface = $pconfig['interface'];
$jail_securelevel = $pconfig['securelevel'];
$jail_devfs_ruleset = $pconfig['devfs_ruleset'];
$jail_enforce_statfs = $pconfig['enforce_statfs'];
$jail_vnet_interface = $pconfig['vnet_interface'];
if(isset($pconfig['jname'])):
$jail_name = $pconfig['jname'];
endif;
if(isset($pconfig['hostname'])):
$jail_hostname = $pconfig['hostname'];
endif;
if(isset($pconfig['ipv4'])):
$jail_ipv4 = $pconfig['ipv4'];
endif;
if(isset($pconfig['ipv6'])):
$jail_ipv6 = $pconfig['ipv6'];
endif;
if(isset($pconfig['interface'])):
$jail_interface = $pconfig['interface'];
endif;
if(isset($pconfig['securelevel'])):
$jail_securelevel = $pconfig['securelevel'];
endif;
if(isset($pconfig['devfs_ruleset'])):
$jail_devfs_ruleset = $pconfig['devfs_ruleset'];
endif;
if(isset($pconfig['enforce_statfs'])):
$jail_enforce_statfs = $pconfig['enforce_statfs'];
endif;
if(isset($pconfig['vnet_interface'])):
$jail_vnet_interface = $pconfig['vnet_interface'];
endif;
// Check if the config has changed.
// This could be done with a nice foreach loop in the future.