Bug 30565: DBRev 21.12.00.040
[koha.git] / installer / data / mysql / db_revs / 211200034.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "30237",
5     description => "Replace ACCDETAILS notice with WELCOME notice",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9         # Add WELCOME notice
10         $dbh->do(q{
11             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');
12         });
13
14         # Update system preference
15         $dbh->do(q{
16             UPDATE systempreferences SET variable = 'AutoEmailNewUser', explanation = 'Send an email to newly created patrons.' WHERE variable = 'AutoEmailOpacUser'
17         });
18     },
19 };