[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/catalogue search.pl [rel_3_0]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/catalogue search.pl [rel_3_0] |
Date: |
Fri, 09 Feb 2007 17:09:26 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_3_0
Changes by: Henri-Damien LAURENT <hdl> 07/02/09 17:09:26
Modified files:
catalogue : search.pl
Log message:
Bug Fixing in pagination code.
the same var was used insed a loop and outside. Could be harmfull.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/search.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.15&r2=1.1.2.16
Patches:
Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/catalogue/Attic/search.pl,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -u -b -r1.1.2.15 -r1.1.2.16
--- search.pl 9 Jan 2007 15:18:09 -0000 1.1.2.15
+++ search.pl 9 Feb 2007 17:09:26 -0000 1.1.2.16
@@ -2,7 +2,7 @@
# Script to perform searching
# For documentation try 'perldoc /path/to/search'
#
-# $Header: /cvsroot/koha/koha/catalogue/Attic/search.pl,v 1.1.2.15 2007/01/09
15:18:09 hdl Exp $
+# $Header: /cvsroot/koha/koha/catalogue/Attic/search.pl,v 1.1.2.16 2007/02/09
17:09:26 hdl Exp $
#
# Copyright 2006 LibLime
#
@@ -434,9 +434,9 @@
$current_page_number = ($offset / $results_per_page + 1) if
$offset;
my $previous_page_offset = $offset - $results_per_page unless
($offset - $results_per_page <0);
my $next_page_offset = $offset + $results_per_page;
- for ($i=1; $i<=$pages;$i++) {
- my $this_offset = (($i*$results_per_page)-$results_per_page);
- my $this_page_number = $i;
+ for (my $j=1; $j<=$pages;$j++) {
+ my $this_offset = (($j*$results_per_page)-$results_per_page);
+ my $this_page_number = $j;
my $highlight = 1 if ($this_page_number ==
$current_page_number);
push @page_numbers, { offset => $this_offset, pg =>
$this_page_number, highlight => $highlight, sort_by => join " ",@sort_by };
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/catalogue search.pl [rel_3_0],
Henri-Damien LAURENT <=