From 4efc55709af9b3c613e064b99e9532ff1dacc9e9 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 ++++---- installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql | 4 ++-- opac/opac-sendbasket.pl | 4 ++-- opac/opac-sendshelf.pl | 3 ++- virtualshelves/sendshelf.pl | 4 ++-- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index e15a9a1067..93e194c858 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 efa111b2b7..3e97bba684 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 5fc591425a..1ca20fcfb9 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1633,11 +1633,11 @@ tables: - "Waiting since: <>" - "Notes: <>" - - 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 @@ -1663,11 +1663,11 @@ tables: - "[% IF ( biblio.items.count > 0 ) %]Items:
    [% FOREACH item IN biblio.items %]
  • [% item.holding_branch.branchname | html %][% item.location | html %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]
  • [% END %]
[% 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/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 0be5a30552..6e856b6754 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -504,7 +504,7 @@ INSERT IGNORE INTO letter (module, code, name, title, content, message_transport [% END %] ", 'email'); -INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"Hi, +INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('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 %]
@@ -528,7 +528,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/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 179930e39c..dccb827d2c 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 acbe9a6465..ab132d3118 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 f147af25a9..105d35a454 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