|
Lines 31-43
use C4::Biblio qw(
Link Here
|
| 31 |
GetMarcSubjects |
31 |
GetMarcSubjects |
| 32 |
); |
32 |
); |
| 33 |
use C4::Items qw( GetItemsInfo ); |
33 |
use C4::Items qw( GetItemsInfo ); |
| 34 |
use C4::Output qw( output_html_with_http_headers ); |
34 |
use C4::Output qw( |
|
|
35 |
output_html_with_http_headers |
| 36 |
output_and_exit |
| 37 |
); |
| 35 |
use Koha::Email; |
38 |
use Koha::Email; |
| 36 |
use Koha::Virtualshelves; |
39 |
use Koha::Virtualshelves; |
| 37 |
|
40 |
|
| 38 |
my $query = CGI->new; |
41 |
my $query = CGI->new; |
| 39 |
|
42 |
|
| 40 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
43 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 41 |
{ |
44 |
{ |
| 42 |
template_name => "virtualshelves/sendshelfform.tt", |
45 |
template_name => "virtualshelves/sendshelfform.tt", |
| 43 |
query => $query, |
46 |
query => $query, |
|
Lines 49-55
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
| 49 |
my $shelfid = $query->param('shelfid'); |
52 |
my $shelfid = $query->param('shelfid'); |
| 50 |
my $to_address = $query->param('email'); |
53 |
my $to_address = $query->param('email'); |
| 51 |
|
54 |
|
| 52 |
my $dbh = C4::Context->dbh; |
55 |
my $shelf = Koha::Virtualshelves->find( $shelfid ); |
|
|
56 |
|
| 57 |
output_and_exit( $query, $cookie, $template, 'insufficient_permission' ) |
| 58 |
if $shelf && !$shelf->can_be_viewed( $loggedinuser ); |
| 53 |
|
59 |
|
| 54 |
if ($to_address) { |
60 |
if ($to_address) { |
| 55 |
my $comment = $query->param('comment'); |
61 |
my $comment = $query->param('comment'); |
|
Lines 63-69
if ($to_address) {
Link Here
|
| 63 |
} |
69 |
} |
| 64 |
); |
70 |
); |
| 65 |
|
71 |
|
| 66 |
my $shelf = Koha::Virtualshelves->find( $shelfid ); |
|
|
| 67 |
my $contents = $shelf->get_contents; |
72 |
my $contents = $shelf->get_contents; |
| 68 |
my $marcflavour = C4::Context->preference('marcflavour'); |
73 |
my $marcflavour = C4::Context->preference('marcflavour'); |
| 69 |
my $iso2709; |
74 |
my $iso2709; |
| 70 |
- |
|
|