bugfixing scan index
authorPaul POULAIN <paul.poulain@biblibre.com>
Fri, 20 Jun 2008 15:36:56 +0000 (17:36 +0200)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 8 Jul 2008 20:33:36 +0000 (15:33 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
catalogue/search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl

index 4d45f6f..75aab08 100755 (executable)
@@ -414,6 +414,8 @@ my @results;
 
 ## 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/(.*=)(.*)/;
@@ -421,8 +423,10 @@ for my $this_cgi ( split('&',$query_cgi) ) {
     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;
index 9b6216f..3f447c0 100755 (executable)
@@ -147,7 +147,7 @@ $(window).load(function() {
                 <!-- 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" -->&quot;<!-- TMPL_VAR NAME="title_nospan" -->&quot;"><!-- TMPL_VAR NAME="title" --></a>
+                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=<!-- TMPL_VAR name="scan_index" -->&amp;q=<!-- TMPL_VAR NAME="scan_use" escape="url" -->&quot;<!-- TMPL_VAR NAME="title_nospan" -->&quot;"><!-- TMPL_VAR NAME="title" --></a>
                         </td>
                         <td>
                             <!-- TMPL_VAR NAME="author" -->