[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.22.2.3,1.22.2.4

Joshua Ferraro joshferraro at users.sourceforge.net
Wed Jul 6 23:28:52 CEST 2005


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

Modified Files:
      Tag: rel_2_2
	opac-reserve.pl 
Log Message:
sort the branches alphebetically.


Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.22.2.3
retrieving revision 1.22.2.4
diff -C2 -r1.22.2.3 -r1.22.2.4
*** opac-reserve.pl	6 Jul 2005 19:54:44 -0000	1.22.2.3
--- opac-reserve.pl	6 Jul 2005 21:28:49 -0000	1.22.2.4
***************
*** 58,61 ****
--- 58,65 ----
  
  my $branches = getbranches();
+ 
+ if (!$branches->{$branch}) {
+ $branch='';
+ }
  $template->param(branchname => $branches->{$branch}->{'branchname'});
  
***************
*** 70,81 ****
  foreach my $branch (keys %$branches) {
  	if ($branch) {
- 
  		my %line;
  		$line{branch} = $branches->{$branch}->{'branchname'};
- 		warn "here's  a branch:".$line{branch};
  		$line{value} = $branch;
  		push @CGIbranchlooparray, \%line;
  	}
  }
  my $CGIbranchloop = \@CGIbranchlooparray;
  $template->param( CGIbranch => $CGIbranchloop);
--- 74,84 ----
  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);
***************
*** 208,215 ****
  		$template->param(fee => $fee,istherefee => $fee>0?1:0);
  		$template->param(item_types_selected => 1);
  	} else {
  		$template->param(message => 1);
  		$template->param(no_items_selected => 1) unless ($proceed);
! 		$template->param(no_branch_selected =>1) unless ($branch);
  	}
  } elsif ($query->param('place_reserve')) {
--- 211,221 ----
  		$template->param(fee => $fee,istherefee => $fee>0?1:0);
  		$template->param(item_types_selected => 1);
+ 		warn "Branch is ==$branch==";
+ 		$template->param(no_branch_selected => 1) unless ($branch!='');
  	} else {
  		$template->param(message => 1);
  		$template->param(no_items_selected => 1) unless ($proceed);
! 		$template->param(no_branch_selected => 1) unless ($branch);
! 		warn "Branch is ==$branch==";
  	}
  } elsif ($query->param('place_reserve')) {





More information about the Koha-cvs mailing list