Bug 30237: (follow-up) Update Notice
[koha.git] / installer / data / mysql / atomicupdate / bug_30237.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 [% 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');});
12
13         # Update system preference
14         $dbh->do( q{
15             UPDATE systempreferences SET variable = 'AutoEmailNewUser', explanation = 'Send an email to newly created patrons.' WHERE variable = 'AutoEmailOpacUser'
16         });
17     },
18 };