Bugzilla – Attachment 121726 Details for
Bug 28487
Overdue_notices does not fall back to default language
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28487: Fallback to default template in overdue_notices
Bug-28487-Fallback-to-default-template-in-overduen.patch (text/plain), 2.42 KB, created by
Martin Renvoize (ashimema)
on 2021-06-09 08:28:51 UTC
(
hide
)
Description:
Bug 28487: Fallback to default template in overdue_notices
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-09 08:28:51 UTC
Size:
2.42 KB
patch
obsolete
>From ede55123785d0c0f736802199d4e9371c28cbf33 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 4 Jun 2021 12:19:18 +0200 >Subject: [PATCH] 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> >--- > misc/cronjobs/overdue_notices.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index bf1a370a11..16d708c0dc 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -624,7 +624,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|; >@@ -715,7 +716,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, >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28487
:
121580
|
121627
|
121726
|
121853