diff options
author | ivan <ivan> | 2003-07-04 01:37:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-07-04 01:37:46 +0000 |
commit | f2098c54512150c098f28f59ffe4a62464ef630e (patch) | |
tree | d852359c37b4f47df2b866a89bd5a8eaa3d2283c /FS | |
parent | af213c494294f73750b6b5b07ca828782ff3a9e4 (diff) |
don't populate the whole initial list if there are tons of POPs
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/svc_acct_pop.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/FS/FS/svc_acct_pop.pm b/FS/FS/svc_acct_pop.pm index 404816b47..196ab7ebb 100644 --- a/FS/FS/svc_acct_pop.pm +++ b/FS/FS/svc_acct_pop.pm @@ -166,7 +166,13 @@ END $text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD><TD>'; $text .= qq!<SELECT NAME="popnum" SIZE=1><OPTION> !; - foreach my $pop ( @svc_acct_pop ) { + my @initial_select; + if ( scalar(@svc_acct_pop) > 100 ) { + @initial_select = qsearchs( 'svc_acct_pop', { 'popnum' => $popnum } ); + } else { + @initial_select = @svc_acct_pop; + } + foreach my $pop ( @initial_select ) { $text .= qq!<OPTION VALUE="!. $pop->popnum. '"'. ( ( $popnum && $pop->popnum == $popnum ) ? ' SELECTED' : '' ). ">". $pop->text; @@ -181,7 +187,7 @@ END =head1 VERSION -$Id: svc_acct_pop.pm,v 1.8 2003-07-04 00:51:29 ivan Exp $ +$Id: svc_acct_pop.pm,v 1.9 2003-07-04 01:37:46 ivan Exp $ =head1 BUGS |