(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.
This commit is contained in:
parent
135a0d6e58
commit
b3e6346e67
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<form name="f" method="post" action="auth_finder.pl">
|
||||
<form name="f" method="get" action="auth_finder.pl">
|
||||
<input type="hidden" name="op" value="do_search" />
|
||||
<input type="hidden" name="type" value="intranet" />
|
||||
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<option value="start">starts with</option>
|
||||
<option value="is">is exactly</option>
|
||||
</select>
|
||||
<input type="text" name="value" value="<!-- TMPL_VAR name="mainmainstring" -->" />
|
||||
<input type="text" name="value_mainstr" value="<!-- TMPL_VAR ESCAPE="HTML" name="value_mainstr" -->" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="mainentry">Main entry</label>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<option value="start">starts with</option>
|
||||
<option value="is">is exactly</option>
|
||||
</select>
|
||||
<input type="text" name="value" value="<!-- TMPL_VAR name="mainstring" -->" />
|
||||
<input type="text" name="value_main" value="<!-- TMPL_VAR ESCAPE="HTML" name="value_main" -->" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="marclist">Anywhere</label>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
<option value="start">starts with</option>
|
||||
<option value="is">is exactly</option>
|
||||
</select>
|
||||
<input type="text" name="value" value="<!-- TMPL_VAR name="anystring" -->" />
|
||||
<input type="text" name="value_any" value="<!-- TMPL_VAR ESCAPE="HTML" name="value_any" -->" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="orderby">Sort by </label>
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue