From 0200a65d4faef805f7b8dde074f304e4a4177db1 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 31 Mar 2022 23:02:35 +0000 Subject: [PATCH] Bug 30426: Add missing C4::Auth and C4::Output imports This patch adds missing function imports for C4::Auth and C4::Output in the opac/svc/suggestion script. Test plan: 1. Go to http://localhost:8081/cgi-bin/koha/admin/didyoumean.pl 2. Turn on some plugins 3. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 4. Note in your browser's Network tab that the call to http://localhost:8080/cgi-bin/koha/svc/suggestion?render=stub&q=test generates a 200 response instead of a 500 error Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers --- opac/svc/suggestion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/svc/suggestion b/opac/svc/suggestion index 04b0655b34..0f8cd5d0d4 100755 --- a/opac/svc/suggestion +++ b/opac/svc/suggestion @@ -53,9 +53,9 @@ Number of suggestions to display. Defaults to 4 in stub mode, 20 otherwise. use Modern::Perl; -use C4::Auth; +use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output; +use C4::Output qw( output_html_with_http_headers ); use CGI qw ( -utf8 ); use JSON; use Koha::SuggestionEngine; -- 2.39.5