From 76e83aa5d05887be342d58e880c30b0c95195046 Mon Sep 17 00:00:00 2001 From: rangi Date: Sat, 3 Sep 2005 00:09:34 +0000 Subject: [PATCH] Script to display reviews, given a biblionumber --- opac/opac-showreviews.pl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 opac/opac-showreviews.pl diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl new file mode 100755 index 0000000000..4bdc0d1f4c --- /dev/null +++ b/opac/opac-showreviews.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl +use strict; +require Exporter; +use CGI; + +use C4::Auth; +use C4::Koha; +use HTML::Template; +use C4::Interface::CGI::Output; +use C4::Search; +use C4::Circulation::Circ2; +use C4::Review; + +my $query = new CGI; +my $biblionumber = $query->param('biblionumber'); + +my ($template, $borrowernumber, $cookie) + = get_template_and_user({template_name => "opac-showreviews.tmpl", + query => $query, + type => "opac", + authnotrequired => 0, + flagsrequired => {borrow => 1}, + debug => 1, + }); + +my $biblio=bibdata($biblionumber,'opac'); +my $reviews=getreviews($biblionumber,1); + +$template->param('reviews' => $reviews, +'title' => $biblio->{'title'}); + +output_html_with_http_headers $query, $cookie, $template->output; + -- 2.39.5