From 5cf66ad6ddc711da6521cf17ae54ea530c573167 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 23 Mar 2009 13:02:14 +0100 Subject: [PATCH] (bug #3051) bad support of pagination in auth_finder This patch change the page to use GET instead of post, and use independants "input" names for searched values. Else the args are not passed to the next page due to rewrite rules. Signed-off-by: Galen Charlton --- authorities/auth_finder.pl | 16 +++++++++++----- .../prog/en/includes/auth-finder-search.inc | 8 ++++---- .../prog/en/modules/cataloguing/addbiblio.tmpl | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index fef6cbf894..7070b12d38 100755 --- a/authorities/auth_finder.pl +++ b/authorities/auth_finder.pl @@ -59,7 +59,7 @@ if ( $op eq "do_search" ) { my @and_or = $query->param('and_or'); my @excluding = $query->param('excluding'); my @operator = $query->param('operator'); - my @value = $query->param('value'); + my @value = ($query->param('value_mainstr'), $query->param('value_main'), $query->param('value_any')); my $orderby = $query->param('orderby'); $resultsperpage = $query->param('resultsperpage'); @@ -86,9 +86,12 @@ if ( $op eq "do_search" ) { push @field_data, { term => "and_or", val => $and_or[$i] }; push @field_data, { term => "excluding", val => $excluding[$i] }; push @field_data, { term => "operator", val => $operator[$i] }; - push @field_data, { term => "value", val => $value[$i] }; } + push @field_data, { term => "value_mainstr", val => $query->param('value_mainstr') || "" }; + push @field_data, { term => "value_main", val => $query->param('value_main') || "" }; + push @field_data, { term => "value_any", val => $query->param('value_any') || ""}; + my @numbers = (); if ( $total > $resultsperpage ) { @@ -141,9 +144,9 @@ if ( $op eq "do_search" ) { to => $to, numbers => \@numbers, authtypecode => $authtypecode, - mainmainstring => $value[0], - mainstring => $value[1], - anystring => $value[2], + value_mainstr => $query->param('value_mainstr') || "", + value_main => $query->param('value_main') || "", + value_any => $query->param('value_any') || "", ); } else { ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -166,6 +169,9 @@ $template->param( index => $index, authtypesloop => \@authtypesloop, authtypecode => $authtypecode, + value_mainstr => $query->param('value_mainstr') || "", + value_main => $query->param('value_main') || "", + value_any => $query->param('value_any') || "", ); # Print the page diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc index becb878948..8a725f008a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc @@ -1,4 +1,4 @@ -
+ " /> @@ -18,7 +18,7 @@ - " /> + " />
  • @@ -30,7 +30,7 @@ - " /> + " />
  • @@ -42,7 +42,7 @@ - " /> + " />
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index a3ece208b8..67e5947b4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -172,7 +172,7 @@ function openAuth(tagsubfieldid,authtype) { } } } - newin=window.open("../authorities/auth_finder.pl?authtypecode="+ authtype+ "&index="+tagsubfieldid+"&mainmainstring="+encodeURI(mainmainstring)+"&mainstring="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); + newin=window.open("../authorities/auth_finder.pl?authtypecode="+ authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); } -- 2.39.5