From a3f41e258ecd2ce59eb77e819c92ff75fc21bcea Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 28 Apr 2022 22:11:49 +0000 Subject: [PATCH] Bug 3150: (follow-up) Fixing errors and notices --- basket/sendbasket.pl | 4 ++-- .../mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl | 4 ++-- installer/data/mysql/en/mandatory/sample_notices.yml | 8 ++++---- opac/opac-sendbasket.pl | 4 ++-- opac/opac-sendshelf.pl | 3 ++- virtualshelves/sendshelf.pl | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index e15a9a10673..93e194c8588 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -65,7 +65,7 @@ if ( $email_add ) { my $iso2709; foreach my $bib ( @bibs ) { - my $biblio = Koha::Biblios->find( $biblionumber ) or next; + my $biblio = Koha::Biblios->find( $bib ) or next; $iso2709 .= $biblio->metadata->record->as_usmarc(); } @@ -85,7 +85,7 @@ if ( $email_add ) { ); my $letter = C4::Letters::GetPreparedLetter( - module => 'catalog', + module => 'catalogue', letter_code => 'CART', lang => $patron->lang, tables => { diff --git a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl b/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl index efa111b2b7c..3e97bba684d 100644 --- a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl +++ b/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl @@ -1,7 +1,7 @@ $DBversion = 'XXX'; if( CheckVersion( $DBversion ) ) { $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES -('catalog','LIST','','Send list',0,'Your list: [% listname | html %]',"Hi, +('catalogue','LIST','','Send list',1,'Your list: [% listname | html %]',"Hi, [% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]. Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.
[% comment | html %]
@@ -25,7 +25,7 @@ Please note that the attached file is a MARC bibliographic records file which ca [% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %] [% item.barcode | html %][% END %][% END %]
[% END %]", 'email','default' ), - ('catalog','CART','','Send cart',0,'Your cart',"Hi, + ('catalogue','CART','','Send cart',1,'Your cart',"Hi, [% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog. Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.
[% comment | html %]
diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 5104c4af7b9..cf56d0b3bdf 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1699,11 +1699,11 @@ tables: - "

If you did not do this, someone else may be using your account. Please contact technical support.

" - "

Your library

" - - module: catalog + - module: catalogue code: LIST branchcode: "" name: "Send list" - is_html: 0 + is_html: 1 title: "Your list: [% listname | html %]" message_transport_type: email lang: default @@ -1729,11 +1729,11 @@ tables: - "[% IF ( biblio.items.count > 0 ) %]Items: [% END %]" - "
[% END %]" - - module: catalog + - module: catalogue code: CART branchcode: "" name: "Send cart" - is_html: 0 + is_html: 1 title: "Your cart" message_transport_type: email lang: default diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 179930e39c3..dccb827d2c1 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -66,7 +66,7 @@ if ( $email_add ) { my $iso2709; foreach my $bib ( @bibs ) { - my $biblio = Koha::Biblios->find( $biblionumber ) or next; + my $biblio = Koha::Biblios->find( $bib ) or next; $iso2709 .= $biblio->metadata->record->as_usmarc(); }; @@ -86,7 +86,7 @@ if ( $email_add ) { ); my $letter = C4::Letters::GetPreparedLetter( - module => 'catalog', + module => 'catalogue', letter_code => 'CART', lang => $patron->lang, tables => { diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index acbe9a6465a..ab132d31182 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -78,6 +78,7 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { my $contents = $shelf->get_contents; my $iso2709; + my @biblionumbers; while ( my $content = $contents->next ) { push @biblionumbers, $content->biblionumber; my $biblio = Koha::Biblios->find($content->biblionumber); @@ -101,7 +102,7 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { ); my $letter = C4::Letters::GetPreparedLetter( - module => 'catalog', + module => 'catalogue', letter_code => 'LIST', lang => $patron->lang, tables => { diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index f147af25a92..105d35a4547 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -69,7 +69,7 @@ if ($to_address) { } ); - my $patron = Koha:::Patrons->find( $borrowernumber ); + my $patron = Koha::Patrons->find( $borrowernumber ); my $user_email = $patron->first_valid_email_address; my $contents = $shelf->get_contents; my @biblionumbers; @@ -98,7 +98,7 @@ if ($to_address) { ); my $letter = C4::Letters::GetPreparedLetter( - module => 'catalog', + module => 'catalogue', letter_code => 'LIST', lang => $patron->lang, tables => { -- 2.11.0