fixing page numbers to use query_cgi
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
139754f2dd
commit
abeafbf079
3 changed files with 12 additions and 6 deletions
10
C4/Search.pm
10
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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -316,11 +316,12 @@
|
|||
|
||||
<!-- TMPL_IF NAME="PAGE_NUMBERS" --><div class="pages">
|
||||
<!-- Row of numbers corresponding to search result pages -->
|
||||
<!-- TMPL_IF NAME="previous_page_offset" --><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="previous_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->"><< Previous</a><!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP NAME="PAGE_NUMBERS" --><!-- TMPL_IF NAME="highlight" --><span class="current"><!-- TMPL_VAR NAME="pg" --></span><!-- TMPL_ELSE --> <a class="nav" href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->"><!-- TMPL_VAR NAME="pg" --></a><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="previous_page_offset" --><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" -->&offset=<!-- TMPL_VAR NAME="previous_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->"><< Previous</a><!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_LOOP NAME="PAGE_NUMBERS" --><!-- TMPL_IF NAME="highlight" --><span class="current"><!-- TMPL_VAR NAME="pg" --></span><!-- TMPL_ELSE --> <a class="nav" href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" -->&offset=<!-- TMPL_VAR NAME="offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->"><!-- TMPL_VAR NAME="pg" --></a><!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
||||
<!-- TMPL_IF NAME="next_page_offset" --><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="next_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->">Next >></a><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="next_page_offset" --><a class="nav" href="/cgi-bin/koha/catalogue/search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" -->&offset=<!-- TMPL_VAR NAME="next_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->">Next >></a><!-- /TMPL_IF -->
|
||||
</div><!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF NAME="outer_sup_results_loop" -->
|
||||
|
|
Loading…
Reference in a new issue