summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/msgcat.cgi
diff options
context:
space:
mode:
authorivan <ivan>2006-08-23 22:25:39 +0000
committerivan <ivan>2006-08-23 22:25:39 +0000
commit3ce7691203a7737406bf2d4442f7fd84b81f847e (patch)
tree90658b097da96772224f04771888ac6ca1a940aa /httemplate/edit/process/msgcat.cgi
parent15e561850b61b10a92a46d8f3e316d53d4970087 (diff)
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/edit/process/msgcat.cgi')
-rw-r--r--httemplate/edit/process/msgcat.cgi39
1 files changed, 20 insertions, 19 deletions
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");
-}
-
-%>