mirror of https://github.com/aredn/aredn.git
bugfix: new settings will now show after a conditional setting (#343)
This commit is contained in:
parent
d9acfa2ea7
commit
89c9d37075
|
@ -146,14 +146,14 @@ for($i=0;$i<$scount;$i++)
|
||||||
$newval=~ s/^\s+|\s+$//;
|
$newval=~ s/^\s+|\s+$//;
|
||||||
if ($setting[$i]->{'type'} eq "boolean")
|
if ($setting[$i]->{'type'} eq "boolean")
|
||||||
{
|
{
|
||||||
if ($newval)
|
if ($newval)
|
||||||
{
|
{
|
||||||
$newval="1";
|
$newval="1";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$newval="0";
|
$newval="0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$key=$setting[$i]->{'key'};
|
$key=$setting[$i]->{'key'};
|
||||||
@x=split(/\./, $setting[$i]->{'key'});
|
@x=split(/\./, $setting[$i]->{'key'});
|
||||||
|
@ -227,7 +227,11 @@ foreach(@setting)
|
||||||
# check to see if setting is conditional
|
# check to see if setting is conditional
|
||||||
if($setting[$scount]->{'condition'})
|
if($setting[$scount]->{'condition'})
|
||||||
{
|
{
|
||||||
next if !eval $setting[$scount]->{'condition'};
|
if (!eval $setting[$scount]->{'condition'})
|
||||||
|
{
|
||||||
|
$scount++;
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$sconfig = $_->{'key'};
|
$sconfig = $_->{'key'};
|
||||||
$sval = `uci -q get '$sconfig'`;
|
$sval = `uci -q get '$sconfig'`;
|
||||||
|
|
Loading…
Reference in New Issue