From: Christopher Hall Date: Wed, 2 Feb 2011 23:16:12 +0000 (+1300) Subject: fixed for/end scoping issue for single lines X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=10807ef6c860b8d05f1b97d14396056d8dd379ed;p=koha.git fixed for/end scoping issue for single lines --- diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl index 05827c451b..ce65e97d3d 100755 --- a/installer/html-template-to-template-toolkit.pl +++ b/installer/html-template-to-template-toolkit.pl @@ -78,6 +78,9 @@ foreach my $file (@template_files) { my $for_loop_found = 0; for my $input_tmpl(<$ITMPL>){ + my @parts = split "<", $input_tmpl; + for( my $i=0; $i<=$#parts; ++$i ){ + my $input_tmpl = $i ? "<" . $parts[$i] : $parts[$i]; # add < sign back in to every part except the first $for_loop_found = 0; # handle poorly names variable such as f1!, f1+, f1-, f1| and mod @@ -175,6 +178,7 @@ foreach my $file (@template_files) { # Write out.. print $OTT $input_tmpl; + } } close $ITMPL; close $OTT;