From 1d22dc0dcb1ae24ffd63a9fb4ffd4c00aa68e9cd 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 --- acqui/check_uniqueness.pl | 1 + catalogue/image.pl | 1 + labels/label-create-csv.pl | 1 + labels/label-create-xml.pl | 1 + serials/lateissues-export.pl | 1 + 5 files changed, 5 insertions(+) diff --git a/acqui/check_uniqueness.pl b/acqui/check_uniqueness.pl index 791814095f7..aece6aac55b 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 efdcae49370..af950a65346 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -27,6 +27,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; +use C4::Auth qw( check_cookie_auth ); use Koha::Biblios; use Koha::CoverImages; diff --git a/labels/label-create-csv.pl b/labels/label-create-csv.pl index 80c662e85a8..a6c6f943ee5 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 a3bec34ec07..7d1e38e1b3d 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 f82b9f1e187..dff0e5a7acd 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.34.1