Line 0
Link Here
|
0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
|
3 |
return { |
4 |
bug_number => "364244", |
5 |
description => "Template toolkit syntax ont escaped in letter templates", |
6 |
up => sub { |
7 |
my ($args) = @_; |
8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
9 |
|
10 |
my $query = q{SELECT * FROM letter WHERE content LIKE "[|%%SET%<<%|%]" ESCAPE '|'}; |
11 |
my $sth = $dbh->prepare($query); |
12 |
$sth->execute(); |
13 |
if ( $sth->rows ) { |
14 |
say $out "You have one or more templates that have been affected by bug 364244."; |
15 |
say $out "These templates assign template toolkit variables values."; |
16 |
say $out "based on the double arrows syntax. E.g. [% SET name = '<<branches.branchname>>' %]"; |
17 |
say $out "This will no longer function correctly as Template Toolkit is now rendered before the double arrow syntax."; |
18 |
say $out "The following notices will need to be updated:"; |
19 |
|
20 |
while ( my $row = $sth->fetchrow_hashref() ) { |
21 |
say $out |
22 |
"ID: $row->{id} / MODULE: $row->{module} / CODE: $row->{code} / BRANCHCODE: $row->{branchcode} / NAME: $row->{name}"; |
23 |
} |
24 |
} |
25 |
}, |
26 |
}; |