From 6882fa0fdbb11bb638b17261da2e26dcb717b9eb Mon Sep 17 00:00:00 2001 From: Christopher Hall Date: Thu, 25 Nov 2010 11:07:51 +1300 Subject: [PATCH] fixed loop variables --- installer/html-template-to-template-toolkit.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl index 619ecef4be..e8b890f9f6 100755 --- a/installer/html-template-to-template-toolkit.pl +++ b/installer/html-template-to-template-toolkit.pl @@ -135,6 +135,9 @@ foreach my $file (@template_files) { $input_tmpl =~ s/URL/url/ig; $input_tmpl =~ s/__first__/loop.first/ig; $input_tmpl =~ s/__last__/loop.last/ig; + $input_tmpl =~ s/__odd__/loop.odd/ig; + $input_tmpl =~ s/__even__/loop.even/ig; + $input_tmpl =~ s/__counter__/loop.count/ig; #loop.count gives the range (0..max) whereas loop.index gives the range (1..max+1), __counter__ is unknown #hack to get around lack of javascript filter $input_tmpl =~ s/\|JS/|replace("'", "\\'") |replace('"', '\\"') |replace('\\n', '\\\\n') |replace('\\r', '\\\\r')/ig; -- 2.11.0