X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=d8cd0a0724dce220323c6f228b54b5ca44ee964e;hb=c34e73e4a0f8ab38adc88829598207e219a86928;hp=7aa4021d6328d052aa3ddd115ed57ad1caf62098;hpb=5424f0aac49ed570bec0fb3c3342c4d2893e737e;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 7aa4021d6..d8cd0a072 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; #use vars qw( $conf %ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby ); @@ -9,7 +9,7 @@ use CGI::Carp qw(fatalsToBrowser); use IO::Handle; use String::Approx qw(amatch); use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs dbdef ut_name); +use FS::Record qw(qsearch qsearchs dbdef); use FS::CGI qw(header menubar eidiot popurl table); use FS::cust_main; use FS::cust_svc; @@ -59,7 +59,7 @@ if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) { } else { my($total)=scalar(@cust_main); - print $cgi->header( '-expires' => 'now' ), header("Customer Search Results",menubar( + print $cgi->header( @FS::CGI::header ), header("Customer Search Results",menubar( 'Main Menu', popurl(2) )), "$total matching customers found "; if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me @@ -250,8 +250,9 @@ sub lastsearch { $last_type{$_}++; } - my $error = ut_name($cgi->param('last_text')); - eidiot "Illegal last name" if $error; + $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/ + or eidiot "Illegal last name"; + my($last)=$1; if ( $last_type{'Exact'} && ! $last_type{'Fuzzy'}