X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fedit%2Fprocess%2Fcust_main_county.cgi;h=0fc1708c57a3df91d9fc243359be01a379e235b8;hb=cd6989b0380bb289bffac0b947a3bfa6eb8c773e;hp=ce5a4f6710775eb3e0ad805441045e5e4d5dc3b6;hpb=ef834d58bfd2ce38c8bea73262c8091a5d88388f;p=freeside.git diff --git a/htdocs/edit/process/cust_main_county.cgi b/htdocs/edit/process/cust_main_county.cgi index ce5a4f671..0fc1708c5 100755 --- a/htdocs/edit/process/cust_main_county.cgi +++ b/htdocs/edit/process/cust_main_county.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main_county.cgi,v 1.2 1998-11-18 09:01:41 ivan Exp $ +# $Id: cust_main_county.cgi,v 1.6 1999-01-25 12:19:08 ivan Exp $ # # ivan@sisd.com 97-dec-16 # @@ -10,19 +10,33 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main_county.cgi,v $ -# Revision 1.2 1998-11-18 09:01:41 ivan +# Revision 1.6 1999-01-25 12:19:08 ivan +# yet more mod_perl stuff +# +# Revision 1.5 1999/01/19 05:13:52 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:47:53 ivan +# s/create/new/g; and use fields('table_name') +# +# Revision 1.3 1998/12/17 08:40:21 ivan +# s/CGI::Request/CGI.pm/; etc +# +# Revision 1.2 1998/11/18 09:01:41 ivan # i18n! i18n! # use strict; +use vars qw( $cgi ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); -use FS::CGI qw(eidiot); +use FS::CGI qw(popurl); use FS::Record qw(qsearch qsearchs); use FS::cust_main_county; -my($req)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); foreach ( $cgi->param ) { @@ -33,10 +47,14 @@ foreach ( $cgi->param ) { next unless $old->getfield('tax') ne $cgi->param("tax$taxnum"); my(%hash)=$old->hash; $hash{tax}=$cgi->param("tax$taxnum"); - my($new)=create FS::cust_main_county \%hash; + my($new)=new FS::cust_main_county \%hash; my($error)=$new->replace($old); - eidiot($error) if $error; + if ( $error ) { + $cgi->param('error', $error); + print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string ); + exit; + } } -$cgi->redirect(popurl(3). "/browse/cust_main_county.cgi"); +print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");