Bugzilla – Attachment 67145 Details for
Bug 17981
Add the ability to preview generated notice templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17981: Add a 'letter' param to GetPreparedLetter
Bug-17981-Add-a-letter-param-to-GetPreparedLetter.patch (text/plain), 2.00 KB, created by
Jonathan Druart
on 2017-09-15 14:23:58 UTC
(
hide
)
Description:
Bug 17981: Add a 'letter' param to GetPreparedLetter
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-15 14:23:58 UTC
Size:
2.00 KB
patch
obsolete
>From 5b7d0ff1c8bfe4d747fd7a63f99dd010a6689243 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 24 Jan 2017 11:18:46 +0100 >Subject: [PATCH] Bug 17981: Add a 'letter' param to GetPreparedLetter > >This will allow us to call GetPreparedLetter with a letter content that >does not exist in the DB > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 3f23090c6b..ab7c6c4e3c 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -685,18 +685,22 @@ sub SendAlerts { > sub GetPreparedLetter { > my %params = @_; > >- my $module = $params{module} or croak "No module"; >- my $letter_code = $params{letter_code} or croak "No letter_code"; >- my $branchcode = $params{branchcode} || ''; >- my $mtt = $params{message_transport_type} || 'email'; >- my $lang = $params{lang} || 'default'; >- >- my $letter = getletter( $module, $letter_code, $branchcode, $mtt, $lang ); >+ my $letter = $params{letter}; > > unless ( $letter ) { >- $letter = getletter( $module, $letter_code, $branchcode, $mtt, 'default' ) >- or warn( "No $module $letter_code letter transported by " . $mtt ), >- return; >+ my $module = $params{module} or croak "No module"; >+ my $letter_code = $params{letter_code} or croak "No letter_code"; >+ my $branchcode = $params{branchcode} || ''; >+ my $mtt = $params{message_transport_type} || 'email'; >+ my $lang = $params{lang} || 'default'; >+ >+ $letter = getletter( $module, $letter_code, $branchcode, $mtt, $lang ); >+ >+ unless ( $letter ) { >+ $letter = getletter( $module, $letter_code, $branchcode, $mtt, 'default' ) >+ or warn( "No $module $letter_code letter transported by " . $mtt ), >+ return; >+ } > } > > my $tables = $params{tables} || {}; >-- >2.11.0
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 17981
:
59508
|
59509
|
59510
|
59514
|
59524
|
63978
|
63979
|
63980
|
63981
|
63982
|
65688
|
65689
|
65690
|
65701
|
65702
|
65703
|
65704
|
65705
|
67144
|
67145
|
67146
|
67147
|
67148
|
67152
|
70300
|
70301
|
70302
|
70303
|
70304
|
70305
|
73201
|
73202
|
73203
|
73204
|
73205
|
73206
|
73949
|
73950
|
73951
|
73952
|
74025
|
74027
|
74028
|
74029
|
74030
|
74031
|
74032
|
74033
|
74034