diff options
author | ivan <ivan> | 1999-01-19 05:14:23 +0000 |
---|---|---|
committer | ivan <ivan> | 1999-01-19 05:14:23 +0000 |
commit | c116ce940c33dcd7e37a87a8eb2936e17cc68b11 (patch) | |
tree | 504ed73e822a6ae40aae152134e7d022a88bd566 /htdocs/misc/cancel-unaudited.cgi | |
parent | 65a4f2fb7d37996f89b5e22dac831e57d467d050 (diff) |
for mod_perl: no more top-level my() variables; use vars instead
also the last s/create/new/;
Diffstat (limited to 'htdocs/misc/cancel-unaudited.cgi')
-rwxr-xr-x | htdocs/misc/cancel-unaudited.cgi | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/htdocs/misc/cancel-unaudited.cgi b/htdocs/misc/cancel-unaudited.cgi index 4c5fbc7f3..b8729440f 100755 --- a/htdocs/misc/cancel-unaudited.cgi +++ b/htdocs/misc/cancel-unaudited.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cancel-unaudited.cgi,v 1.3 1998-12-23 03:02:05 ivan Exp $ +# $Id: cancel-unaudited.cgi,v 1.4 1999-01-19 05:14:03 ivan Exp $ # # Usage: cancel-unaudited.cgi svcnum # http://server.name/path/cancel-unaudited.cgi pkgnum @@ -18,7 +18,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cancel-unaudited.cgi,v $ -# Revision 1.3 1998-12-23 03:02:05 ivan +# Revision 1.4 1999-01-19 05:14:03 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:02:05 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:42 ivan @@ -26,6 +30,7 @@ # use strict; +use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -34,18 +39,18 @@ use FS::Record qw(qsearchs); use FS::cust_svc; use FS::svc_acct; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint svcnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($svcnum)=$1; +$svcnum = $1; -my($svc_acct) = qsearchs('svc_acct',{'svcnum'=>$svcnum}); +$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); &eidiot("Unknown svcnum!") unless $svc_acct; -my($cust_svc) = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); &eidiot(qq!This account has already been audited. Cancel the <A HREF="!. popurl(2). qq!view/cust_pkg.cgi?! . $cust_svc->getfield('pkgnum') . qq!pkgnum"> package</A> instead.!) @@ -57,8 +62,6 @@ local $SIG{QUIT} = 'IGNORE'; local $SIG{TERM} = 'IGNORE'; local $SIG{TSTP} = 'IGNORE'; -my($error); - $error = $svc_acct->cancel; &eidiot($error) if $error; $error = $svc_acct->delete; |