Lines 40-46
use Koha::Virtualshelves;
Link Here
|
40 |
|
40 |
|
41 |
my $query = CGI->new; |
41 |
my $query = CGI->new; |
42 |
|
42 |
|
43 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
43 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
44 |
{ |
44 |
{ |
45 |
template_name => "virtualshelves/sendshelfform.tt", |
45 |
template_name => "virtualshelves/sendshelfform.tt", |
46 |
query => $query, |
46 |
query => $query, |
Lines 55-74
my $to_address = $query->param('email');
Link Here
|
55 |
my $shelf = Koha::Virtualshelves->find( $shelfid ); |
55 |
my $shelf = Koha::Virtualshelves->find( $shelfid ); |
56 |
|
56 |
|
57 |
output_and_exit( $query, $cookie, $template, 'insufficient_permission' ) |
57 |
output_and_exit( $query, $cookie, $template, 'insufficient_permission' ) |
58 |
if $shelf && !$shelf->can_be_viewed( $loggedinuser ); |
58 |
if $shelf && !$shelf->can_be_viewed( $borrowernumber ); |
59 |
|
59 |
|
60 |
if ($to_address) { |
60 |
if ($to_address) { |
61 |
my $comment = $query->param('comment'); |
61 |
my $comment = $query->param('comment'); |
62 |
|
62 |
|
63 |
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( |
|
|
64 |
{ |
65 |
template_name => "virtualshelves/sendshelf.tt", |
66 |
query => $query, |
67 |
type => "intranet", |
68 |
flagsrequired => { catalogue => 1 }, |
69 |
} |
70 |
); |
71 |
|
72 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
63 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
73 |
my $user_email = $patron->first_valid_email_address; |
64 |
my $user_email = $patron->first_valid_email_address; |
74 |
my $contents = $shelf->get_contents; |
65 |
my $contents = $shelf->get_contents; |
75 |
- |
|
|