From b3e6346e67f3cb4f70492d0351abb460b73e6bdc Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 23 Mar 2009 13:00:03 +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. --- authorities/auth_finder.pl | 18 +++++++++++------- .../prog/en/includes/auth-finder-search.inc | 8 ++++---- .../prog/en/modules/cataloguing/addbiblio.tmpl | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index 34b762e008..763ec05982 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( @@ -162,8 +165,9 @@ if ( $op eq "do_search" ) { } $template->param( - mainstring => $query->param('mainstring')||"", - mainmainstring => $query->param('mainmainstring')|"", + value_mainstr => $query->param('value_mainstr') || "", + value_main => $query->param('value_main') || "", + value_any => $query->param('value_any') || "", tagid => $tagid, index => $index, authtypesloop => \@authtypesloop, 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 65d6d160fd..17366e98c4 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 a3d8769f34..b331d1ceb9 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