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/susp_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/susp_pkg.cgi')
-rwxr-xr-x | htdocs/misc/susp_pkg.cgi | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/htdocs/misc/susp_pkg.cgi b/htdocs/misc/susp_pkg.cgi index 7b8096470..851a53f7f 100755 --- a/htdocs/misc/susp_pkg.cgi +++ b/htdocs/misc/susp_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: susp_pkg.cgi,v 1.3 1998-12-23 03:04:56 ivan Exp $ +# $Id: susp_pkg.cgi,v 1.4 1999-01-19 05:14:08 ivan Exp $ # # Usage: susp_pkg.cgi pkgnum # http://server.name/path/susp_pkg.cgi pkgnum @@ -23,7 +23,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: susp_pkg.cgi,v $ -# Revision 1.3 1998-12-23 03:04:56 ivan +# Revision 1.4 1999-01-19 05:14:08 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:04:56 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:48 ivan @@ -31,23 +35,24 @@ # use strict; +use vars qw( $cgi $query $pkgnum $cust_pkg $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint pkgnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my($error)=$cust_pkg->suspend; +$error = $cust_pkg->suspend; &eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); |