[freeside-commits] freeside/httemplate/misc/process delay_susp_pkg.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Thu Jun 16 16:06:22 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv29148/httemplate/misc/process
Modified Files:
delay_susp_pkg.html
Log Message:
rework suspension delays, RT#6956
Index: delay_susp_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/delay_susp_pkg.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- delay_susp_pkg.html 9 Apr 2010 08:18:24 -0000 1.2
+++ delay_susp_pkg.html 16 Jun 2011 23:06:20 -0000 1.3
@@ -1,4 +1,4 @@
-<% header("Package suspension delayed") %>
+<% header($msg) %>
<SCRIPT TYPE="text/javascript">
window.top.location.reload();
</SCRIPT>
@@ -21,21 +21,27 @@
$pkgnum = $1;
#untaint date
+my $date = '';
+my $msg = '';
+if ( $cgi->param('date') ) {
parse_datetime($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date";
-my $date = $1;
+ $date = $1;
+ $msg = 'Package suspension delayed';
+} else {
+ $msg = 'Suspension delay removed';
+}
$cust_pkg = qsearchs( 'cust_pkg', {'pkgnum'=>$pkgnum} );
if ($cust_pkg) {
- $cust_main = $cust_pkg->cust_main;
- $cust_main->dundate( $date );
- $error = $cust_main->replace;
+ $cust_pkg->dundate( $date );
+ $error = $cust_pkg->replace;
} else {
- $error = "Invalid pkgnum";
+ $error = "Unknown pkgnum";
}
if ($error) {
$cgi->param('error', $error);
- print $cgi->redirect(popurl(2). "cancel_pkg.html?". $cgi->query_string );
+ print $cgi->redirect(popurl(2). "delay_susp_pkg.html?". $cgi->query_string );
}
</%init>
More information about the freeside-commits
mailing list