Bug 30237: (follow-up) Make LibraryName conditional

It's easy to forget to set the LibraryName preference.. as such we can
make this a conditional and fall back to a default of 'the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2022-04-11 15:13:49 +01:00 committed by Fridolin Somers
parent 40b9d9e668
commit 6ab1dcef95
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ return {
my ($dbh, $out) = @$args{qw(dbh out)};
# Add WELCOME notice
$dbh->do( q{
INSERT IGNORE INTO letter (module, code, name, is_html, title, content, message_transport_type) VALUES ('members', 'WELCOME', 'Welcome notice', 1, "[% USE Koha %]Welcome to [% Koha.Preference('LibraryName') %]", "[% USE Koha %]\r\nHello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].\r\n\r\nThank you for joining [% Koha.Preference('LibraryName') %]\r\n\r\nYou can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>.\r\n\r\nYour library card number is [% borrower.cardnumber %]\r\n\r\nIf you have any problems or questions regarding your account, please contact the library.", 'email');});
INSERT IGNORE INTO letter (module, code, name, is_html, title, content, message_transport_type) VALUES ('members', 'WELCOME', 'Welcome notice', 1, "[% USE Koha %]Welcome to [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]", "[% USE Koha %]\r\nHello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].\r\n\r\nThank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]\r\n\r\nYou can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>.\r\n\r\nYour library card number is [% borrower.cardnumber %]\r\n\r\nIf you have any problems or questions regarding your account, please contact the library.", 'email');});
# Update system preference
$dbh->do( q{

View file

@ -1068,14 +1068,14 @@ tables:
branchcode: ""
name: "Welcome notice "
is_html: 1
title: "[% USE Koha %]Welcome to [% Koha.Preference('LibraryName') %]"
title: "[% USE Koha %][% IF Koha.Preference('LibraryName') %]Welcome to [% Koha.Preference('LibraryName') %][% ELSE %]Welcome to the library[% END %]"
message_transport_type: email
lang: default
content:
- "[% USE Koha %]"
- "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]."
- ""
- "Thankyou for joining [% Koha.Preference('LibraryName') %]"
- "Thankyou for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]"
- ""
- "You can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>."
- ""