From d2ad672404ea5a06ffe63b5264b3b58afb45593d Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 23 Jun 2015 17:45:30 +0200 Subject: [PATCH] Bug 14440: get_template_and_user can not have an empty template_name (opac-ratings.pl) Since Bug 14408, the method get_template_and_user can not have an empty template_name. Pages calling with an empty value should use C4::Auth::checkauth() This patch corrects opac/opac-ratings.pl Test plan : - 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' => The page is reloaded and you see 'your rating: 4' - Loggout from OPAC - Try to access URL : http:///cgi-bin/koha/opac-ratings.pl => You see the loggin page Signed-off-by: Indranil Das Gupta (L2C2 Technologies) Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi Conflicts: opac/opac-ratings.pl --- opac/opac-ratings.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opac/opac-ratings.pl b/opac/opac-ratings.pl index a765608601..24f8042016 100755 --- a/opac/opac-ratings.pl +++ b/opac/opac-ratings.pl @@ -27,9 +27,7 @@ note: there is currently no 'delete rating' functionality in this script use strict; use warnings; -use CGI qw ( -utf8 ); -use CGI::Cookie; - +use CGI; use C4::Auth; use C4::Context; use C4::Ratings; -- 2.39.5