summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorthalakan <thalakan>2001-10-10 05:59:36 +0000
committerthalakan <thalakan>2001-10-10 05:59:36 +0000
commit5e3669b83521736b7add66986f36f9c3096d187f (patch)
tree2c3014d79445095a96d99c25df00cf33e0ca4607 /httemplate
parent38b4a18a459a4fba3c73d4b46b2a08875413fec6 (diff)
Stupid mistake. Works now.
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_main.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 0744744e8..0794ad0cb 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -1,5 +1,5 @@
<%
-#<!-- $Id: cust_main.cgi,v 1.8 2001-10-10 05:42:19 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.9 2001-10-10 05:59:36 thalakan Exp $ -->
use strict;
#use vars qw( $conf %ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby );
@@ -250,9 +250,11 @@ sub lastsearch {
$last_type{$_}++;
}
- $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/
- or eidiot "Illegal last name";
- my($last)=$1;
+ my $cust_obj = new FS::cust_main;
+ $cust_obj->setfield('last', $cgi->param('last_text'));
+ my $error = $cust_obj->ut_name('last');
+ eidiot "Illegal last name" if $error;
+ my($last) = $cust_obj->getfield('last');
if ( $last_type{'Exact'}
&& ! $last_type{'Fuzzy'}