syncing dev-week and HEAD
[koha.git] / opac / opac-showreviews.pl
1 #!/usr/bin/perl
2 use strict;
3 require Exporter;
4 use CGI;
5
6 use C4::Auth;
7 use C4::Koha;
8 use HTML::Template;
9 use C4::Interface::CGI::Output;
10 use C4::Search;
11 use C4::Circulation::Circ2;
12 use C4::Review;
13
14 my $query = new CGI;
15 my $biblionumber = $query->param('biblionumber');
16
17 my ($template, $borrowernumber, $cookie) 
18     = get_template_and_user({template_name => "opac-showreviews.tmpl",
19                              query => $query,
20                              type => "opac",
21                              authnotrequired => 0,
22                              flagsrequired => {borrow => 1},
23                              debug => 1,
24                              });
25
26 my $biblio=bibdata($biblionumber,'opac');
27 my $reviews=getreviews($biblionumber,1);
28
29 $template->param('reviews' => $reviews,
30 'title' => $biblio->{'title'});
31
32 output_html_with_http_headers $query, $cookie, $template->output;
33