mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix to use a new API to preserve existing config options (when hidden)
This commit is contained in:
@@ -263,17 +263,27 @@ return &has_command("hwclock") &&
|
||||
!&running_in_openvz() && !&running_in_zone();
|
||||
}
|
||||
|
||||
# config_preserve()
|
||||
# Returns a list of config options that
|
||||
# cannot be shown on the given system
|
||||
sub config_preserve
|
||||
{
|
||||
my @forbidden_keys;
|
||||
|
||||
# Do not display timeformat for Linux systems
|
||||
push(@forbidden_keys, 'seconds')
|
||||
if ($gconfig{'os_type'} =~ /linux$/);
|
||||
|
||||
return @forbidden_keys;
|
||||
}
|
||||
|
||||
# config_pre_load(mod-info-ref, [mod-order-ref])
|
||||
# Check if some config options are conditional,
|
||||
# and if not allowed, remove them from listing
|
||||
sub config_pre_load
|
||||
{
|
||||
my ($modconf_info, $modconf_order) = @_;
|
||||
my @forbidden_keys;
|
||||
|
||||
# Do not display timeformat for Linux systems
|
||||
push(@forbidden_keys, 'seconds')
|
||||
if ($gconfig{'os_type'} =~ /linux$/);
|
||||
my @forbidden_keys = &config_preserve();
|
||||
|
||||
# Remove forbidden from display
|
||||
foreach my $fkey (@forbidden_keys) {
|
||||
|
||||
Reference in New Issue
Block a user