X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-process.cgi;h=6af7d2322606302914e4065c857adf636ffe666b;hp=d84edce0043f270b36263c71360041c722a1dee6;hb=4fd1280540e2c9b90fa59c0c32d691f5222f65d4;hpb=5372897f367498972c96f5494e142e6e11b29eb8;ds=sidebyside diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index d84edce00..6af7d2322 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -155,7 +155,9 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { } } elsif ( $type eq 'checkbox' ) { if ( defined $cgi->param($i->key.$n) ) { - push @touch, $i->key; + my $error = &{$i->validate}('', $n) if $i->validate; + push @error, $error if $error; + push @touch, $i->key if !$error; } else { push @delete, $i->key; } @@ -167,7 +169,7 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { if ( scalar(@{[ $cgi->param($i->key.$n) ]}) && $cgi->param($i->key.$n) ne '' ) { my $error = &{$i->validate}([ $cgi->param($i->key.$n) ], $n) if $i->validate; push @error, $error if $error; - $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum); + $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum) if !$error; } else { $conf->delete($i->key, $agentnum); }