summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthalakan <thalakan>2001-10-10 05:33:43 +0000
committerthalakan <thalakan>2001-10-10 05:33:43 +0000
commit5424f0aac49ed570bec0fb3c3342c4d2893e737e (patch)
tree1482cd8aea3035b72a0c5a0561e3e403757e43da
parent672aab6658cf490d740b49336d16994072a0e506 (diff)
Change to use ut_name instead.
-rwxr-xr-xhttemplate/search/cust_main.cgi9
1 files changed, 4 insertions, 5 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 25dbe6964..7aa4021d6 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -1,5 +1,5 @@
<%
-#<!-- $Id: cust_main.cgi,v 1.6 2001-09-16 12:45:35 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.7 2001-10-10 05:33:43 thalakan Exp $ -->
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);
+use FS::Record qw(qsearch qsearchs dbdef ut_name);
use FS::CGI qw(header menubar eidiot popurl table);
use FS::cust_main;
use FS::cust_svc;
@@ -250,9 +250,8 @@ sub lastsearch {
$last_type{$_}++;
}
- $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/
- or eidiot "Illegal last name";
- my($last)=$1;
+ my $error = ut_name($cgi->param('last_text'));
+ eidiot "Illegal last name" if $error;
if ( $last_type{'Exact'}
&& ! $last_type{'Fuzzy'}