From 3604df19920174c23a7385f7fb2cf5f62361e788 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Apr 2024 15:55:57 +0000 Subject: [PATCH] Bug 36511: Some scripts missing a dependency following Bug 24879 These files needed the addition of 'use C4::Auth qw( check_cookie_auth );'. To test, apply the patch and restart services. - If necessary, enable the LocalCoverImages system preference. - Open the browser console and then the "Network" tab. You can click "Images" to filter for the correct kind of request. - Perform a catalog search. After the search has loaded, check that there are no 500 errors in the Network tab. - Go to Cataloging -> Label creator. - If necessary, create a label batch and add some items. - Export your batch and test both the "Download as CSV" and "Download as XML" links. Both should trigger the correct download. - Go to Serials -> Claims, and select a vendor with late issues. - Select all late issues and click "Download selected claims" at the bottom of the page. - Your CSV file should download correctly. The file acqui/check_uniqueness.pl has been corrected as well but I'm not sure how to test it! Signed-off-by: danyonsewell Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer (cherry picked from commit 747f5132311ea51ea6babbfc92a775ac0c67f93a) Signed-off-by: Fridolin Somers (cherry picked from commit 01b22fb71d30f56d3102837b5c9b4cfdacbc9e76) Signed-off-by: Lucas Gass Signed-off-by: Wainui Witika-Park --- acqui/check_uniqueness.pl | 1 + catalogue/image.pl | 2 ++ labels/label-create-csv.pl | 1 + labels/label-create-xml.pl | 1 + serials/lateissues-export.pl | 1 + 5 files changed, 6 insertions(+) diff --git a/acqui/check_uniqueness.pl b/acqui/check_uniqueness.pl index 791814095f..aece6aac55 100755 --- a/acqui/check_uniqueness.pl +++ b/acqui/check_uniqueness.pl @@ -35,6 +35,7 @@ use CGI qw ( -utf8 ); use JSON qw( to_json ); use C4::Output qw( output_with_http_headers ); use C4::Items qw( SearchItems ); +use C4::Auth qw( check_cookie_auth ); my $input = CGI->new; my ($auth_status) = diff --git a/catalogue/image.pl b/catalogue/image.pl index 6d2cc6d092..617ca43cc7 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -27,6 +27,8 @@ use Modern::Perl; use CGI qw ( -utf8 ); #qw(:standard escapeHTML); use C4::Context; +use C4::Auth qw( check_cookie_auth ); +use Koha::Biblios; use Koha::CoverImages; use Koha::Biblios; use Koha::Exceptions; diff --git a/labels/label-create-csv.pl b/labels/label-create-csv.pl index 80c662e85a..a6c6f943ee 100755 --- a/labels/label-create-csv.pl +++ b/labels/label-create-csv.pl @@ -24,6 +24,7 @@ use CGI qw ( -utf8 ); use Text::CSV_XS; use C4::Labels; +use C4::Auth qw( check_cookie_auth ); my $cgi = CGI->new; my ($auth_status) = diff --git a/labels/label-create-xml.pl b/labels/label-create-xml.pl index a3bec34ec0..7d1e38e1b3 100755 --- a/labels/label-create-xml.pl +++ b/labels/label-create-xml.pl @@ -24,6 +24,7 @@ use CGI qw ( -utf8 ); use XML::Simple; use C4::Labels; +use C4::Auth qw( check_cookie_auth ); my $cgi = CGI->new; my ($auth_status) = diff --git a/serials/lateissues-export.pl b/serials/lateissues-export.pl index f82b9f1e18..dff0e5a7ac 100755 --- a/serials/lateissues-export.pl +++ b/serials/lateissues-export.pl @@ -21,6 +21,7 @@ use C4::Auth; use C4::Serials qw( GetLateOrMissingIssues updateClaim ); use C4::Output; use C4::Context; +use C4::Auth qw( check_cookie_auth ); use Koha::CsvProfiles; -- 2.39.5