[Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.12,1.13

Paul POULAIN tipaul at users.sourceforge.net
Thu Apr 24 20:44:21 CEST 2003


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv2702/opac

Modified Files:
	opac-searchresults.pl 
Log Message:
fix for #406

Index: opac-searchresults.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-searchresults.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** opac-searchresults.pl	18 Mar 2003 20:25:31 -0000	1.12
--- opac-searchresults.pl	24 Apr 2003 18:44:17 -0000	1.13
***************
*** 31,36 ****
  my @fields = ('keyword', 'subject', 'author', 'illustrator', 'itemnumber', 'isbn', 'date-before', 'date-after', 'class', 'dewey', 'branch', 'title', 'abstract', 'publisher');
  
- 
- 
  # collect all the fields ...
  my %search;
--- 31,34 ----
***************
*** 92,96 ****
  
  my $startfrom=$query->param('startfrom');
! ($startfrom) || ($startfrom=0);
  
  my $resultsarray=\@results;
--- 90,94 ----
  
  my $startfrom=$query->param('startfrom');
! ($startfrom) || ($startfrom=1);
  
  my $resultsarray=\@results;
***************
*** 103,107 ****
  $template->param(numrecords => $count);
  my $nextstartfrom=($startfrom+$num<$count) ? ($startfrom+$num) : (-1);
! my $prevstartfrom=($startfrom-$num>=0) ? ($startfrom-$num) : (-1);
  $template->param(nextstartfrom => $nextstartfrom);
  my $displaynext=($nextstartfrom==-1) ? 0 : 1;
--- 101,105 ----
  $template->param(numrecords => $count);
  my $nextstartfrom=($startfrom+$num<$count) ? ($startfrom+$num) : (-1);
! my $prevstartfrom=($startfrom-$num>=0) ? ($startfrom-$number_of_results) : (-1);
  $template->param(nextstartfrom => $nextstartfrom);
  my $displaynext=($nextstartfrom==-1) ? 0 : 1;
***************
*** 116,125 ****
  my $numbers;
  @$numbers = ();
! if ($count>10) {
!     for (my $i=1; $i<$count/10+1; $i++) {
  	my $highlight=0;
  	my $themelang = $template->param('themelang');
! 	($startfrom==($i-1)*10) && ($highlight=1);
! 	push @$numbers, { number => $i, highlight => $highlight , startfrom => ($i-1)*10 };
      }
  }
--- 114,123 ----
  my $numbers;
  @$numbers = ();
! if ($count>$number_of_results) {
!     for (my $i=1; $i<$count/$number_of_results+1; $i++) {
  	my $highlight=0;
  	my $themelang = $template->param('themelang');
! 	($startfrom==($i-1)*$number_of_results+1) && ($highlight=1);
! 	push @$numbers, { number => $i, highlight => $highlight , startfrom => ($i-1)*$number_of_results+1 };
      }
  }





More information about the Koha-cvs mailing list