diff options
| author | ivan <ivan> | 2002-11-26 11:58:16 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2002-11-26 11:58:16 +0000 | 
| commit | 19a2dc52ad06809cd34f69552114110092bcf7c8 (patch) | |
| tree | d18d0be6fba93893bbd3f1c1ff5971a93853ecad /httemplate/misc/process | |
| parent | 619b855386019c4e2e242e8df3ccfe842f09566d (diff) | |
link by username now only links to same svcpart
Diffstat (limited to 'httemplate/misc/process')
| -rwxr-xr-x | httemplate/misc/process/link.cgi | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi index 4b220a867..5d80adeb9 100755 --- a/httemplate/misc/process/link.cgi +++ b/httemplate/misc/process/link.cgi @@ -8,12 +8,15 @@ $cgi->param('svcnum') =~ /^(\d*)$/;  my $svcnum = $1;  unless ( $svcnum ) { -  my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart}); -  my($svcdb) = $part_svc->getfield('svcdb'); -  $cgi->param('link_field') =~ /^(\w+)$/; my($link_field)=$1; -  my($svc_x)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') }); +  my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); +  my $svcdb = $part_svc->getfield('svcdb'); +  $cgi->param('link_field') =~ /^(\w+)$/; +  my $link_field = $1; +  my $svc_x = ( grep { $_->cust_svc->svcpart == $svcpart }  +                  qsearch( $svcdb, { $link_field => $cgi->param('link_value') }) +              )[0];    eidiot("$link_field not found!") unless $svc_x; -  $svcnum=$svc_x->svcnum; +  $svcnum = $svc_x->svcnum;  }  my $old = qsearchs('cust_svc',{'svcnum'=>$svcnum}); | 
