@@ -, +, @@ empty template_name (opac-ratings.pl) - Apply patch - Set sysopref OpacStarRatings to 'results and details' - Disable Javascipt on your browser (otherwise it will use ajax) - Login at OPAC - Go to a record - Click on a button left of 'Rate me' to choose a rating, ie 4 - Click on 'Rate me' - Loggout from OPAC - Try to access URL : http:///cgi-bin/koha/opac-ratings.pl --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 1 - opac/opac-ratings.pl | 18 +++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -485,7 +485,6 @@ - --- a/opac/opac-ratings.pl +++ a/opac/opac-ratings.pl @@ -28,8 +28,7 @@ note: there is currently no 'delete rating' functionality in this script use strict; use warnings; use CGI; -use CGI::Cookie; -use C4::Auth qw(:DEFAULT check_cookie_auth); +use C4::Auth; use C4::Context; use C4::Output; use C4::Dates qw(format_date); @@ -38,17 +37,10 @@ use C4::Ratings; use C4::Debug; my $query = CGI->new(); -my $a = $query->Vars; -#### $a -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "", - query => $query, - type => "opac", - authnotrequired => 0, # auth required to add tags - debug => 0, - } -); + +# auth required to add ratings +my ($userid, $cookie, $sessionID) = checkauth( $query, 0, {}, 'opac' ); +my $loggedinuser = C4::Context->userenv->{'number'}; my $biblionumber = $query->param('biblionumber'); my $rating_old_value = $query->param('rating_value'); --