X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fsvc_broadband.cgi;h=8600da3492f0ebc5665eedbab948bcd0057e8d65;hb=0930d22ffc440f80c1b222b2e750cadbabd9e8f6;hp=4912a3a9f7940be7a76e9e65dd0a565215f80048;hpb=5fc8c5edf574ab024d4646914b6432d458e2ffbd;p=freeside.git diff --git a/httemplate/edit/process/svc_broadband.cgi b/httemplate/edit/process/svc_broadband.cgi index 4912a3a9f..8600da349 100644 --- a/httemplate/edit/process/svc_broadband.cgi +++ b/httemplate/edit/process/svc_broadband.cgi @@ -1,10 +1,14 @@ -<% - -# If it's stupid but it works, it's not stupid. -# -- U.S. Army - -local $FS::UID::AutoCommit = 0; -my $dbh = FS::UID::dbh; +%if ( $error ) { +% $cgi->param('error', $error); +% $cgi->param('ip_addr', $new->ip_addr); +<% $cgi->redirect(popurl(2). "svc_broadband.cgi?". $cgi->query_string ) %> +%} else { +<% $cgi->redirect(popurl(3). "view/svc_broadband.cgi?" . $svcnum ) %> +%} +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; my $svcnum = $1; @@ -31,15 +35,4 @@ if ( $svcnum ) { $svcnum = $new->svcnum; } - -if ( $error ) { - $cgi->param('error', $error); - $cgi->param('ip_addr', $new->ip_addr); - $dbh->rollback; - print $cgi->redirect(popurl(2). "svc_broadband.cgi?". $cgi->query_string ); -} else { - $dbh->commit or die $dbh->errstr; - print $cgi->redirect(popurl(3). "view/svc_broadband.cgi?" . $svcnum ); -} - -%> +