[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.24,1.25

Joshua Ferraro joshferraro at users.sourceforge.net
Wed Jul 6 23:32:05 CEST 2005


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23608

Modified Files:
	opac-reserve.pl 
Log Message:
synching with rel_2_2


Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** opac-reserve.pl	4 May 2005 09:02:38 -0000	1.24
--- opac-reserve.pl	6 Jul 2005 21:32:02 -0000	1.25
***************
*** 58,61 ****
--- 58,65 ----
  
  my $branches = getbranches();
+ # make sure it's a real branch
+ if (!$branches->{$branch}) {
+ $branch='';
+ }
  $template->param(branchname => $branches->{$branch}->{'branchname'});
  
***************
*** 66,81 ****
  my %select_branches;
  
  foreach my $branch (keys %$branches) {
  	if ($branch) {
! 		push @select_branch, $branch;
! 		$select_branches{$branch} = $branches->{$branch}->{'branchname'};
  	}
  }
! my $CGIbranch=CGI::scrolling_list( -name     => 'branch',
! 			-values   => \@select_branch,
! 			-labels   => \%select_branches,
! 			-size     => 1,
! 			-multiple => 0 );
! $template->param( CGIbranch => $CGIbranch);
  
  #### THIS IS A BIT OF A HACK BECAUSE THE BIBLIOITEMS DATA IS A LITTLE MESSED UP!
--- 70,87 ----
  my %select_branches;
  
+ my @CGIbranchlooparray;
+ 
  foreach my $branch (keys %$branches) {
  	if ($branch) {
! 		my %line;
!                 $line{branch} = $branches->{$branch}->{'branchname'};
!                 $line{value} = $branch;
!                 push @CGIbranchlooparray, \%line;
  	}
  }
! @CGIbranchlooparray = sort {$a->{branch} cmp $b->{branch}} @CGIbranchlooparray;
! my $CGIbranchloop = \@CGIbranchlooparray;
! $template->param( CGIbranch => $CGIbranchloop);
! 
  
  #### THIS IS A BIT OF A HACK BECAUSE THE BIBLIOITEMS DATA IS A LITTLE MESSED UP!





More information about the Koha-cvs mailing list