## parse the query_cgi string and put it into a form suitable for <input>s
my @query_inputs;
+my $scan_index;
+
for my $this_cgi ( split('&',$query_cgi) ) {
next unless $this_cgi;
$this_cgi =~ m/(.*=)(.*)/;
my $input_value = $2;
$input_name =~ s/=$//;
push @query_inputs, { input_name => $input_name, input_value => $input_value };
+ $scan_index = $input_value unless $scan_index;
}
-$template->param ( QUERY_INPUTS => \@query_inputs );
+$template->param ( QUERY_INPUTS => \@query_inputs,
+ scan_index => $scan_index );
## parse the limit_cgi string and put it into a form suitable for <input>s
my @limit_inputs;
<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
<!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
<td>
- <a href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="scan_use" escape="url" -->"<!-- TMPL_VAR NAME="title_nospan" -->""><!-- TMPL_VAR NAME="title" --></a>
+ <a href="/cgi-bin/koha/catalogue/search.pl?idx=<!-- TMPL_VAR name="scan_index" -->&q=<!-- TMPL_VAR NAME="scan_use" escape="url" -->"<!-- TMPL_VAR NAME="title_nospan" -->""><!-- TMPL_VAR NAME="title" --></a>
</td>
<td>
<!-- TMPL_VAR NAME="author" -->