X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fmsgcat.cgi;h=9711143d68c6426e28b23410f529da3837e6c220;hb=2d568f3b0ef121dd444c47298e8a2a6a8e7d1648;hp=1f94f666801abe84c0f5e36f8c32caa2ed73f5cb;hpb=0b65ce59c7d2ee712389c27954382274ddf718a5;p=freeside.git diff --git a/httemplate/edit/process/msgcat.cgi b/httemplate/edit/process/msgcat.cgi index 1f94f6668..9711143d6 100644 --- a/httemplate/edit/process/msgcat.cgi +++ b/httemplate/edit/process/msgcat.cgi @@ -1,20 +1,21 @@ -<% +% +% +%my $error; +%foreach my $param ( grep { /^\d+$/ } $cgi->param ) { +% my $old = qsearchs('msgcat', { msgnum=>$param } ); +% next if $old->msg eq $cgi->param($param); #no need to update identical records +% my $new = new FS::msgcat { $old->hash }; +% $new->msg($cgi->param($param)); +% $error = $new->replace($old); +% last if $error; +%} +% +%if ( $error ) { +% $cgi->param('error',$error); +% print $cgi->redirect($p. "msgcat.cgi?". $cgi->query_string ); +%} else { +% print $cgi->redirect(popurl(3). "browse/msgcat.cgi"); +%} +% +% -my $error; -foreach my $param ( grep { /^\d+$/ } $cgi->param ) { - my $old = qsearchs('msgcat', { msgnum=>$param } ); - next if $old->msg eq $cgi->param($param); #no need to update identical records - my $new = new FS::msgcat { $old->hash }; - $new->msg($cgi->param($param)); - $error = $new->replace($old); - last if $error; -} - -if ( $error ) { - $cgi->param('error',$error); - print $cgi->redirect($p. "msgcat.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/msgcat.cgi"); -} - -%>