[freeside-commits] freeside/httemplate/edit/process cust_pkg.cgi, 1.6.2.2, 1.6.2.3
Ivan,,,
ivan at wavetail.420.am
Tue Mar 4 11:15:09 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv1422/edit/process
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_pkg.cgi
Log Message:
fix edit/process/cust_pkg getting confused about the two different places that would be calling it... i.e. with an empty new_pkgnum it would redirect the popup back the customer view, hehe
Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_pkg.cgi,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- cust_pkg.cgi 13 Jan 2008 21:36:08 -0000 1.6.2.2
+++ cust_pkg.cgi 4 Mar 2008 19:15:06 -0000 1.6.2.3
@@ -30,9 +30,9 @@
my $curuser = $FS::CurrentUser::CurrentUser;
-my( $action, $error_redirect );
+my( $action, $error_redirect ) = ( '', '' );
my @pkgparts = ();
-if ( $cgi->param('new_pkgpart') =~ /^(\d+)$/ ) { #came from misc/change_pkg.cgi
+if ( $cgi->param('action') eq 'change' ) { #came from misc/change_pkg.cgi
$action = 'change';
$error_redirect = "misc/change_pkg.cgi";
@@ -41,7 +41,7 @@
die "access denied"
unless $curuser->access_right('Change customer package');
-} else { #came from edit/cust_pkg.cgi
+} elsif ( $cgi->param('action') eq 'bulk' ) { #came from edit/cust_pkg.cgi
$action = 'bulk';
$error_redirect = "edit/cust_pkg.cgi";
@@ -61,6 +61,8 @@
}
}
+} else {
+ die "guru exception #5: action is neither change nor bulk!";
}
$error ||= FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums);
More information about the freeside-commits
mailing list