From 2c68039801227916d48ed2970ca22b64b369cc52 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
Signed-off-by: David Nind
---
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 9f6191e346c..abd54deb64f 100755
--- a/basket/sendbasket.pl
+++ b/basket/sendbasket.pl
@@ -64,7 +64,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();
}
@@ -84,7 +84,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 c42a1a9d0cb..b376d6c6cda 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 d4fd9d4b033..665d5306e74 100644
--- a/installer/data/mysql/en/mandatory/sample_notices.yml
+++ b/installer/data/mysql/en/mandatory/sample_notices.yml
@@ -2112,11 +2112,11 @@ tables:
- ""
- "
"
- - 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
@@ -2142,11 +2142,11 @@ tables:
- "[% IF ( biblio.items.count > 0 ) %]Items: [% FOREACH item IN biblio.items %]- [% Branches.GetName( item.holdingbranch ) | html %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => 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/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index a0c9d9736ff..2461cccbebf 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -62,7 +62,7 @@ if ( $email_add ) {
my @bibs = split( /\//, $bib_list );
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();
};
@@ -82,7 +82,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 7de8f5bba23..ddfc1649104 100755
--- a/opac/opac-sendshelf.pl
+++ b/opac/opac-sendshelf.pl
@@ -75,6 +75,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);
@@ -98,7 +99,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 3e944c58c75..5079568e395 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