bugfix: new settings will now show after a conditional setting (#343)

This commit is contained in:
dman776 2019-01-29 12:20:37 -06:00 committed by GitHub
parent d9acfa2ea7
commit 89c9d37075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -146,14 +146,14 @@ for($i=0;$i<$scount;$i++)
$newval=~ s/^\s+|\s+$//;
if ($setting[$i]->{'type'} eq "boolean")
{
if ($newval)
{
$newval="1";
}
else
{
$newval="0";
}
if ($newval)
{
$newval="1";
}
else
{
$newval="0";
}
}
$key=$setting[$i]->{'key'};
@x=split(/\./, $setting[$i]->{'key'});
@ -227,7 +227,11 @@ foreach(@setting)
# check to see if setting is conditional
if($setting[$scount]->{'condition'})
{
next if !eval $setting[$scount]->{'condition'};
if (!eval $setting[$scount]->{'condition'})
{
$scount++;
next;
}
}
$sconfig = $_->{'key'};
$sval = `uci -q get '$sconfig'`;