From ef2855e2cd1a3ea539e29bb7eba92d6728311e57 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Fri, 16 Nov 2007 18:49:13 -0600 Subject: [PATCH] porting sort_by stuff from staff to opac Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 15 ++++++++++++++- opac/opac-search.pl | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index 62389261aa..1c84fe38ff 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -122,7 +122,20 @@

Re-sort results

diff --git a/opac/opac-search.pl b/opac/opac-search.pl index bdccb7f80c..cd8faeac79 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -325,8 +325,8 @@ if ( $template_name eq "opac-advsearch.tmpl" ) { # load the sort_by options for the template my $sort_by = $cgi->param('sort_by'); + $template->param( $sort_by => 1); $sort_by=$1.($2 eq "lt"?'d':'a') if ($sort_by=~/1=(\d+) \&([a-z]+)\;/); - $template->param( sort_by => $sort_by); output_html_with_http_headers $cgi, $cookie, $template->output; exit; @@ -348,7 +348,7 @@ my @sort_by; # load the sort_by options for the template my $sort_by = $params->{'sort_by'}; $sort_by=~$1.($2 eq "lt"?'d':'a') if ($sort_by=~/1=(\d+) \&([a-z]+)\;/); -$template->param( sort_by => $sort_by); +$template->param( $sort_by => 1); # # Use the servers defined, or just search our local catalog(default) -- 2.39.5