[Koha-cvs] koha/opac opac-search.pl

Henri-Damien LAURENT laurenthdl at alinto.com
Fri Jul 20 09:49:06 CEST 2007


CVSROOT:	/cvsroot/koha
Module name:	koha
Changes by:	Henri-Damien LAURENT <hdl>	07/07/20 07:49:06

Modified files:
	opac           : opac-search.pl 

Log message:
	Putting order list into Template rather than setting this in a script. For translations.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-search.pl?cvsroot=koha&r1=1.45&r2=1.46

Patches:
Index: opac-search.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-search.pl,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- opac-search.pl	6 Jul 2007 15:16:40 -0000	1.45
+++ opac-search.pl	20 Jul 2007 07:49:06 -0000	1.46
@@ -3,7 +3,7 @@
 # Script to perform searching
 # For documentation try 'perldoc /path/to/search'
 #
-# $Header: /cvsroot/koha/koha/opac/opac-search.pl,v 1.45 2007/07/06 15:16:40 hdl Exp $
+# $Header: /cvsroot/koha/koha/opac/opac-search.pl,v 1.46 2007/07/20 07:49:06 hdl Exp $
 #
 # Copyright 2006 LibLime
 #
@@ -342,10 +342,8 @@
 
     # load the sort_by options for the template
     my $sort_by      = $cgi->param('sort_by');
-    my $sort_by_loop = displaySortby($sort_by);
-    $template->param(
-        sort_by_loop => $sort_by_loop,
-     );
+    $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;
@@ -366,8 +364,8 @@
 
 # load the sort_by options for the template
 my $sort_by      = $params->{'sort_by'};
-my $sort_by_loop = displaySortby($sort_by);
-$template->param( sort_by_loop => $sort_by_loop );
+$sort_by=~$1.($2 eq "lt"?'d':'a') if ($sort_by=~/1=(\d+) \&([a-z]+)\;/);
+$template->param( sort_by => $sort_by);
 
 #
 # Use the servers defined, or just search our local catalog(default)





More information about the Koha-cvs mailing list