[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.17,1.18 selectbranchprinter.pl,1.8,1.9

Ambrose Li acli at users.sourceforge.net
Wed Feb 5 10:07:12 CET 2003


Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1:/tmp/cvs-serv29903/circ

Modified Files:
	branchtransfers.pl selectbranchprinter.pl 
Log Message:
Fixed bug 202, the branch menu-building code has spurious checks for CU and
IS fields, which does not exist, resulting in no branches being added

For selectbranchprinter:
Noted correct tab size
Handle non-latin1 charsets

For branchtransfers:
Use getbranch and getprinter
Removed spurious checkauth call and associated unused variables


Index: branchtransfers.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/branchtransfers.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** branchtransfers.pl	5 Feb 2003 08:04:00 -0000	1.17
--- branchtransfers.pl	5 Feb 2003 09:07:09 -0000	1.18
***************
*** 51,65 ****
  
  my $query=new CGI;
- my ($loggedinuser, $sessioncookie, $sessionID) = checkauth($query);
  
  
! my $branch = $query->param("branch");
! my $printer = $query->param("printer");
! 
! ($branch) || ($branch=$query->cookie('branch')) ;
! ($printer) || ($printer=$query->cookie('printer')) ;
! 
! ($branches->{$branch}) || ($branch=(keys %$branches)[0]);
! ($printers->{$printer}) || ($printer=(keys %$printers)[0]);
  
  my $genbrname = $branches->{$branch}->{'branchname'} ;
--- 51,58 ----
  
  my $query=new CGI;
  
  
! my $branch = getbranch($query, $branches);
! my $printer = getprinter($query, $printers);
  
  my $genbrname = $branches->{$branch}->{'branchname'} ;
***************
*** 111,115 ****
  my @branchoptionloop;
  foreach my $br (keys %$branches) {
!     (next) unless $branches->{$br}->{'CU'};
      my %branch;
      $branch{selected}=($br eq $tobranchcd);
--- 104,108 ----
  my @branchoptionloop;
  foreach my $br (keys %$branches) {
!     #(next) unless $branches->{$br}->{'CU'}; #FIXME disabled to fix bug 202
      my %branch;
      $branch{selected}=($br eq $tobranchcd);
***************
*** 285,289 ****
  								errmsgloop => \@errmsgloop
  							);
! output_html_with_http_headers $query, $sessioncookie, $template->output;
  
  
--- 278,282 ----
  								errmsgloop => \@errmsgloop
  							);
! output_html_with_http_headers $query, $cookie, $template->output;
  
  

Index: selectbranchprinter.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/selectbranchprinter.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** selectbranchprinter.pl	28 Jan 2003 00:49:55 -0000	1.8
--- selectbranchprinter.pl	5 Feb 2003 09:07:09 -0000	1.9
***************
*** 1,3 ****
--- 1,4 ----
  #!/usr/bin/perl
+ # WARNING: This file uses 4-character tabs!
  
  
***************
*** 25,28 ****
--- 26,30 ----
  use C4::Auth;
  use C4::Print;
+ use C4::Interface::CGI::Output;
  use HTML::Template;
  use DBI;
***************
*** 72,83 ****
  my $printercount=0;
  my @branchloop;
! foreach (keys %$branches) {
!     (next) unless ($_);
!     (next) unless ($branches->{$_}->{'IS'});
      $branchcount++;
  	my %branch;
! 	$branch{selected}=($_ eq $oldbranch);
! 	$branch{name}=$branches->{$_}->{'branchname'};
! 	$branch{value}=$_;
      push(@branchloop,\%branch);
  }
--- 74,85 ----
  my $printercount=0;
  my @branchloop;
! foreach my $br (keys %$branches) {
!     next unless $br =~ /\S/;
!     #(next) unless ($branches->{$_}->{'IS'}); # FIXME disabled to fix bug 202
      $branchcount++;
  	my %branch;
! 	$branch{selected}=($br eq $oldbranch);
! 	$branch{name}=$branches->{$br}->{'branchname'};
! 	$branch{value}=$br;
      push(@branchloop,\%branch);
  }
***************
*** 130,134 ****
  							);
  
! print $query->header(), $template->output;
  
  
--- 132,139 ----
  							);
  
! output_html_with_http_headers $query, $cookie, $template->output;
  
  
+ # Local Variables:
+ # tab-width: 4
+ # End:





More information about the Koha-cvs mailing list