From 9aef4be8ca8be18de115e686942db0b6b1b6b089 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 23 May 2024 06:43:40 +0000 Subject: [PATCH] Bug 36931: Fix label-item-search.pl by removing CSRF requirement This change converts a stateless POST into a GET, so that the paging of the label-item-search.pl results works again. Test plan: 0. Apply the patch and restart Koha 1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new 2. Click "Add item(s)" 3. Add '05/01/2000' in "Added on or after date:" and click "Search" 4. Page through the results 5. Rejoice Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt | 5 ++--- labels/label-item-search.pl | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt index 37458f0f23..1136eeb238 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt @@ -19,9 +19,8 @@ [% END %] -
- [% INCLUDE 'csrf-token.inc' %] - + + diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl index b949e026be..4dba30276d 100755 --- a/labels/label-item-search.pl +++ b/labels/label-item-search.pl @@ -55,7 +55,7 @@ my $display_columns = [ {_add => {label => "Add Item", link_fi {select => {label => "Select", value => "_item_number"}}, ]; -if ( $op eq "cud-do_search" ) { +if ( $op eq "do_search" ) { $idx = $query->param('idx'); $ccl_textbox = $query->param('ccl_textbox'); if ( $ccl_textbox && $idx ) { -- 2.39.5