my $dbh = C4::Context->dbh;
+if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $shelfid, 'view' ) ) {
+
if ( $email ) {
my $email_from = C4::Context->preference('KohaAdminEmailAddress');
my $comment = $query->param('comment');
);
output_html_with_http_headers $query, $cookie, $template->output;
}
+
+} else {
+ $template->param( invalidlist => 1,
+ url => "/cgi-bin/koha/opac-sendshelf.pl",
+ );
+ output_html_with_http_headers $query, $cookie, $template->output;
+}
\ No newline at end of file