From: ivan Date: Mon, 6 Oct 2003 11:39:19 +0000 (+0000) Subject: fix URL argument processing for account searches by popnum X-Git-Tag: NET_WHOIS_RAW_0_31~345 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b144cab922a4c09462f0335e4835a72c985bb56a fix URL argument processing for account searches by popnum --- diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index cd86031c5..e20649cd9 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -48,10 +48,9 @@ if ( $query eq 'svcnum' ) { $sortby=\*uid_sort; $orderby = ( $unlinked ? 'AND' : 'WHERE' ). " ${tblname}uid IS NOT NULL ORDER BY ${tblname}uid"; -} elsif ( $query =~ /^popnum=(\d+)$/ ) { - my $popnum = $1; +} elsif ( $cgi->param('popnum') =~ /^(\d+)$/ ) { $unlinked .= ( $unlinked ? 'AND' : 'WHERE' ). - " popnum = $popnum"; + " popnum = $1"; $sortby=\*username_sort; $orderby = "ORDER BY ${tblname}username"; } else { @@ -63,7 +62,7 @@ if ( $query eq 'svcnum' ) { if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' - || $query =~ /^popnum=(\d+)$/ + || $cgi->param('popnum') =~ /^(\d+)$/ ) { my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked";