From abeafbf079681c1e083eb00cb31a1c1193cffb9f Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Wed, 21 Nov 2007 13:40:15 -0600 Subject: [PATCH] fixing page numbers to use query_cgi Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 10 +++++++--- catalogue/search.pl | 1 + .../prog/en/modules/catalogue/results.tmpl | 7 ++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index fde3f36afe..54537d9c63 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -786,7 +786,9 @@ sub buildQuery { $query .= " $operators[$i-1] "; $query .= " $index_plus " unless $indexes_set; $query .= " $operand"; - $query_cgi .=""; + $query_cgi .="&op=$operators[$i-1]"; + $query_cgi .="&idx=$index" if $index; + $query_cgi .="&q=$operands[$i]" if $operand; $query_search_desc .=" $operators[$i-1] $index_plus $operands[$i]"; } @@ -795,7 +797,8 @@ sub buildQuery { $query .= " and "; $query .= "$index_plus " unless $indexes_set; $query .= "$operand"; - $query_cgi .=""; + $query_cgi .="&op=and&idx=$index" if $index; + $query_cgi .="&q=$operands[$i]" if $operand; $query_search_desc .= " and $index_plus $operands[$i]"; } } @@ -805,7 +808,8 @@ sub buildQuery { $query .=" $index_plus " unless $indexes_set; $query .= $operand; $query_search_desc .= " $index_plus $operands[$i]"; - $query_cgi.=""; + $query_cgi.="&idx=$index" if $index; + $query_cgi.="&q=$operands[$i]" if $operand; $previous_operand = 1; } diff --git a/catalogue/search.pl b/catalogue/search.pl index 2ad81c8dd0..6fa3d8ac6e 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -461,6 +461,7 @@ for (my $i=0;$i<=@servers;$i++) { if ($hits) { $template->param(total => $hits); $template->param(limit_cgi => $limit_cgi); + $template->param(query_cgi => $query_cgi); $template->param(searchdesc => ($query_type?"$query_type=":"")."$query_search_desc" ); $template->param(results_per_page => $results_per_page); $template->param(SEARCH_RESULTS => \@newresults); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl index 17b5fc35ac..49f40a787a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl @@ -316,11 +316,12 @@ -- 2.20.1