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/expire_pkg.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/expire_pkg.cgi')
-rwxr-xr-x | htdocs/misc/expire_pkg.cgi | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/htdocs/misc/expire_pkg.cgi b/htdocs/misc/expire_pkg.cgi index e921c7218..8cf553a26 100755 --- a/htdocs/misc/expire_pkg.cgi +++ b/htdocs/misc/expire_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: expire_pkg.cgi,v 1.2 1998-12-17 09:12:44 ivan Exp $ +# $Id: expire_pkg.cgi,v 1.3 1999-01-19 05:14:05 ivan Exp $ # # Usage: post form to: # http://server.name/path/expire_pkg.cgi @@ -16,11 +16,16 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: expire_pkg.cgi,v $ -# Revision 1.2 1998-12-17 09:12:44 ivan +# Revision 1.3 1999-01-19 05:14:05 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 09:12:44 ivan # s/CGI::(Request|Base)/CGI.pm/; # use strict; +use vars qw ( $cgi $date $pkgnum $cust_pkg %hash $new $error ); use Date::Parse; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -29,12 +34,11 @@ use FS::CGI qw(popurl eidiot); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint date & pkgnum -my($date); if ( $cgi->param('date') ) { str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date"; $date=$1; @@ -43,13 +47,13 @@ if ( $cgi->param('date') ) { } $cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my(%hash)=$cust_pkg->hash; +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +%hash = $cust_pkg->hash; $hash{expire}=$date; -my($new)=create FS::cust_pkg ( \%hash ); -my($error) = $new->replace($cust_pkg); +$new = new FS::cust_pkg ( \%hash ); +$error = $new->replace($cust_pkg); &eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); |