From f87b75522801ee6d08291bb0eeb6bc38a5b785d5 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 21 Sep 2009 15:08:27 +0200 Subject: [PATCH] (bug #3651) sending baskets and shelves this patch restrict the send of baskets and shelves to authenticated users only, and show their surname/firstname in the e-mail, so the receiver will know who sent the list. --- .../opac-tmpl/prog/en/modules/opac-sendbasket.tmpl | 2 +- .../opac-tmpl/prog/en/modules/opac-sendshelf.tmpl | 2 +- opac/opac-sendbasket.pl | 10 ++++++++-- opac/opac-sendshelf.pl | 5 +++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl index 033c4d21d1..5513198279 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl @@ -5,7 +5,7 @@ Your Cart
Hi, -Here is your cart, sent from our online catalog. + sent you a cart from our online catalog. Please note that the attached file is a MARC biblographic records file which can be imported into a Personal Bibliographic Software like EndNote, diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl index 3f8502e795..1d4e4c6f58 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl @@ -5,7 +5,7 @@ Your List :
Hi, -Here is your list called , sent from our online catalog. + , sent you from our online catalog, the virtual shelf called : . Please note that the attached file is a MARC biblographic records file which can be imported into a Personal Bibliographic Software like EndNote, diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index f06230cb08..d450758341 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -28,6 +28,7 @@ use C4::Items; use C4::Auth; use C4::Output; use C4::Biblio; +use C4::Members; my $query = new CGI; @@ -36,7 +37,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( template_name => "opac-sendbasketform.tmpl", query => $query, type => "opac", - authnotrequired => 1, + authnotrequired => 0, flagsrequired => { borrow => 1 }, } ); @@ -99,10 +100,15 @@ if ( $email_add ) { } my $resultsarray = \@results; + + my $user = GetMember($borrowernumber); + $template2->param( BIBLIO_RESULTS => $resultsarray, email_sender => $email_sender, - comment => $comment + comment => $comment, + firstname => $user->{firstname}, + surname => $user->{surname}, ); # Getting template result diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index dc9d2b0838..86b494bd3a 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -31,6 +31,7 @@ use C4::Biblio; use C4::Items; use C4::Output; use C4::VirtualShelves; +use C4::Members; my $query = new CGI; @@ -97,11 +98,15 @@ if ( $email ) { push( @results, $dat ); } + my $user = GetMember($borrowernumber); + $template2->param( BIBLIO_RESULTS => \@results, email_sender => $email_from, comment => $comment, shelfname => $shelf[1], + firstname => $user->{firstname}, + surname => $user->{surname}, ); # Getting template result