From ede915cee54f227a642ea4a2cfe4f7755995a1e9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 25 Feb 2025 14:10:12 +0000 Subject: [PATCH] Bug 38087: Add atomicupdate --- .../data/mysql/atomicupdate/bug_38087.pl | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_38087.pl diff --git a/installer/data/mysql/atomicupdate/bug_38087.pl b/installer/data/mysql/atomicupdate/bug_38087.pl new file mode 100755 index 00000000000..cec5c562324 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_38087.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "38087", + description => "Add print welcome notice", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) + VALUES ('members', 'WELCOME', '', 'Welcome notice', 1, '[% USE Koha %][% IF Koha.Preference("LibraryName") %]Welcome to [% Koha.Preference("LibraryName") %][% ELSE %]Welcome to the library[% END %]', 'print', 'default', '[% USE Koha %]\r\n
\r\n
\r\n
\r\n

\r\n [% borrower.firstname %] [% borrower.surname %]
\r\n [% borrower.address %]
\r\n [% borrower.city %] [% borrower.zipcode %]
\r\n [% borrower.country %]
\r\n

\r\n
\r\n
\r\n

\r\n [% branch.branchname %]
\r\n [% branch.branchaddress1 %]
\r\n [% branch.branchaddress2 %]
\r\n

\r\n
\r\n
\r\n
\r\n

\r\n [% today %]\r\n

\r\n
\r\n
\r\n
\r\n

Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]

\r\n
\r\n
\r\n
\r\n
\r\n

\r\n Thank you for joining [% IF Koha.Preference("LibraryName") %][% Koha.Preference("LibraryName") %][% ELSE %]the library[% END %]
\r\n

\r\n

\r\n You can search for all our materials in our catalog.
\r\n

\r\n

\r\n Your library card number is [% borrower.cardnumber %]
\r\n

\r\n

\r\n If you have any problems or questions regarding your account, please contact the library.
\r\n

\r\n
\r\n
\r\n
') + } + ); + + say_success( $out, "Added notice 'WELCOME'" ); + }, +}; -- 2.48.1