koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/catalogue search.pl


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha/catalogue search.pl
Date: Fri, 20 Jul 2007 16:05:22 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Changes by:     Henri-Damien LAURENT <hdl>      07/07/20 16:05:22

Modified files:
        catalogue      : search.pl 

Log message:
        Bug Fixing search order and pagination link

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/search.pl?cvsroot=koha&r1=1.10&r2=1.11

Patches:
Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/catalogue/search.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- search.pl   13 Jul 2007 15:37:20 -0000      1.10
+++ search.pl   20 Jul 2007 16:05:22 -0000      1.11
@@ -2,7 +2,7 @@
 # Script to perform searching
 # For documentation try 'perldoc /path/to/search'
 #
-# $Header: /cvsroot/koha/koha/catalogue/search.pl,v 1.10 2007/07/13 15:37:20 
toins Exp $
+# $Header: /cvsroot/koha/koha/catalogue/search.pl,v 1.11 2007/07/20 16:05:22 
hdl Exp $
 #
 # Copyright 2006 LibLime
 #
@@ -336,9 +336,9 @@
 my @sort_by;
 @sort_by = split("\0",$params->{'sort_by'}) if $params->{'sort_by'};
 # 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);
+# my $sort_by = $params->{'sort_by'};
+# my $sort_by_loop = displaySortby($sort_by);
+# $template->param(sort_by_loop => $sort_by_loop);
 #
 # Use the servers defined, or just search our local catalog(default)
 my @servers;
@@ -469,10 +469,13 @@
 #             $template->param(PAGE_NUMBERS => address@hidden,
 #                             previous_page_offset => $previous_page_offset,
 #                             next_page_offset => $next_page_offset) unless 
$pages < 2;
-
+      my $link="/cgi-bin/koha/catalogue/search.pl?q=$search_desc&";
+      foreach my $sort (@sort_by){      
+        $link.="&sort_by=".$sort."&";
+      }        
                        $template->param(
                                pagination_bar => pagination_bar(
-                       "/cgi-bin/koha/catalogue/search.pl?q=$search_desc&",
+                       $link,
                        getnbpages($hits, $results_per_page),
                        $page,
                        'page'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]