Bug 28487: Fallback to default template in overdue_notices
There is no fallback to the "default" language if there is no language-specific template for the lang of the patron. I am not really sure why we are not using GetPreparredLetter here (which defaults), but this needs to be backported into all stable branches and so as small as possible. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (cherry picked from commit09fcc66ab8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit0f9066903e) Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> (cherry picked from commitf67344e523) Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> (cherry picked from commitf67344e523)
This commit is contained in:
parent
9593fb13f3
commit
e95b5de082
|
|
@ -598,7 +598,8 @@ END_SQL
|
|||
}
|
||||
}
|
||||
|
||||
my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, undef, $patron->lang );
|
||||
my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, undef, $patron->lang )
|
||||
|| C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, undef, "default");
|
||||
|
||||
unless ($letter) {
|
||||
$verbose and warn qq|Message '$overdue_rules->{"letter$i"}' content not found|;
|
||||
|
|
@ -689,7 +690,8 @@ END_SQL
|
|||
splice @items, $PrintNoticesMaxLines if $effective_mtt eq 'print' && $PrintNoticesMaxLines && scalar @items > $PrintNoticesMaxLines;
|
||||
#catch the case where we are sending a print to someone with an email
|
||||
|
||||
my $letter_exists = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt, $patron->lang ) ? 1 : 0;
|
||||
my $letter_exists = ( C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt, $patron->lang )
|
||||
|| C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt, "default") ) ? 1 : 0;
|
||||
my $letter = parse_overdues_letter(
|
||||
{ letter_code => $overdue_rules->{"letter$i"},
|
||||
borrowernumber => $borrowernumber,
|
||||
|
|
|
|||
Loading…
Reference in New Issue