Line 0
Link Here
|
0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
use Koha::Installer::Output qw(say_warning say_success say_info); |
3 |
|
4 |
return { |
5 |
bug_number => 30915, |
6 |
description => "Warn for use of Context.Scalar in notices", |
7 |
up => sub { |
8 |
my ($args) = @_; |
9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
10 |
|
11 |
my $notices = $dbh->selectcol_arrayref( |
12 |
q{ |
13 |
SELECT code FROM letter WHERE content LIKE '%Context.Scalar%' |
14 |
} |
15 |
); |
16 |
if (@$notices) { |
17 |
say_warning( |
18 |
$out, |
19 |
q|We discovered that your notices as mentioned below are still using Context.Scalar. Please adjust them by following the instructions on Bugzilla report 30915. In most cases [% Context.Scalar($x,$y) %] should simply be [% $x.$y %].| |
20 |
. qq|\nWe found the following notices: | |
21 |
. join( ', ', @$notices ) . q|.| |
22 |
); |
23 |
} |
24 |
}, |
25 |
}; |