diff options
-rwxr-xr-x | httemplate/edit/part_svc.cgi | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 6617d25ed..7fadf000f 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -1,4 +1,4 @@ -<!-- $Id: part_svc.cgi,v 1.2 2001-08-11 04:55:03 ivan Exp $ --> +<!-- $Id: part_svc.cgi,v 1.3 2001-08-11 23:19:09 ivan Exp $ --> <% my $part_svc; if ( $cgi->param('error') ) { #error @@ -6,9 +6,10 @@ map { $_, scalar($cgi->param($_)) } fields('part_svc') } ); } elsif ( $cgi->keywords ) { #edit - my $query = $cgi->keywords; - $query =~ /^(\d+)$/; - $part_svc=qsearchs('part_svc',{'svcpart'=>$1}); + my($query) = $cgi->keywords; + $query =~ /^(\d+)$/ or die "malformed query: $query"; + $part_svc=qsearchs('part_svc', { 'svcpart'=>$1 } ) + or die "unknown svcpart: $1"; } else { #adding $part_svc = new FS::part_svc {}; } |