fix a bug when using rigid and limit values

This commit is contained in:
Jordi Sanfeliu 2013-01-09 15:07:29 +01:00
parent 9215fe6c6c
commit 21604a82b2
1 changed files with 14 additions and 14 deletions

View File

@ -215,8 +215,6 @@ sub net_cgi {
my ($package, $config, $cgi) = @_; my ($package, $config, $cgi) = @_;
my $net = $config->{net}; my $net = $config->{net};
my @rigid = split(',', $net->{rigid});
my @limit = split(',', $net->{limit});
my $tf = $cgi->{tf}; my $tf = $cgi->{tf};
my $colors = $cgi->{colors}; my $colors = $cgi->{colors};
my $graph = $cgi->{graph}; my $graph = $cgi->{graph};
@ -353,6 +351,8 @@ sub net_cgi {
$nl[$n] = trim($nl[$n]); $nl[$n] = trim($nl[$n]);
my $nd = trim((split(',', $net->{desc}->{$nl[$n]}))[0]); my $nd = trim((split(',', $net->{desc}->{$nl[$n]}))[0]);
my $rigid = trim((split(',', $net->{desc}->{$nl[$n]}))[1]);
my $limit = trim((split(',', $net->{desc}->{$nl[$n]}))[2]);
if($title) { if($title) {
if($n) { if($n) {
@ -364,11 +364,11 @@ sub net_cgi {
} }
undef(@riglim); undef(@riglim);
if(trim($rigid[0]) eq 1) { if(trim($rigid) eq 1) {
push(@riglim, "--upper-limit=" . trim($limit[0])); push(@riglim, "--upper-limit=" . trim($limit));
} else { } else {
if(trim($rigid[0]) eq 2) { if(trim($rigid) eq 2) {
push(@riglim, "--upper-limit=" . trim($limit[0])); push(@riglim, "--upper-limit=" . trim($limit));
push(@riglim, "--rigid"); push(@riglim, "--rigid");
} }
} }
@ -471,11 +471,11 @@ sub net_cgi {
print(" <td valign='top' bgcolor='" . $colors->{title_bg_color} . "'>\n"); print(" <td valign='top' bgcolor='" . $colors->{title_bg_color} . "'>\n");
} }
undef(@riglim); undef(@riglim);
if(trim($rigid[1]) eq 1) { if(trim($rigid) eq 1) {
push(@riglim, "--upper-limit=" . trim($limit[1])); push(@riglim, "--upper-limit=" . trim($limit));
} else { } else {
if(trim($rigid[1]) eq 2) { if(trim($rigid) eq 2) {
push(@riglim, "--upper-limit=" . trim($limit[1])); push(@riglim, "--upper-limit=" . trim($limit));
push(@riglim, "--rigid"); push(@riglim, "--rigid");
} }
} }
@ -554,11 +554,11 @@ sub net_cgi {
} }
undef(@riglim); undef(@riglim);
if(trim($rigid[2]) eq 1) { if(trim($rigid) eq 1) {
push(@riglim, "--upper-limit=" . trim($limit[2])); push(@riglim, "--upper-limit=" . trim($limit));
} else { } else {
if(trim($rigid[2]) eq 2) { if(trim($rigid) eq 2) {
push(@riglim, "--upper-limit=" . trim($limit[2])); push(@riglim, "--upper-limit=" . trim($limit));
push(@riglim, "--rigid"); push(@riglim, "--rigid");
} }
} }