[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/circ returns.pl,1.26,1.27
From: |
Ambrose Li |
Subject: |
[Koha-cvs] CVS: koha/circ returns.pl,1.26,1.27 |
Date: |
Tue, 04 Feb 2003 23:57:58 -0800 |
Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1:/tmp/cvs-serv6898/circ
Modified Files:
returns.pl
Log Message:
Fixed bug 200; a "last" was placed in the wrong place
The file does not use 4-character tabs, nor 8-character tabs, it uses both
(!); updated comments.
Catch more $code's; is this (and the change to Circ2.pm) what was intended?
Index: returns.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/returns.pl,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** returns.pl 5 Feb 2003 06:28:58 -0000 1.26
--- returns.pl 5 Feb 2003 07:57:56 -0000 1.27
***************
*** 1,4 ****
#!/usr/bin/perl
! # Please use 8-character tabs for this file (indents are 4 spaces)
#written 11/3/2002 by Finlay
--- 1,6 ----
#!/usr/bin/perl
! # WARNING: This file contains mixed-sized tabs! (some 4-character, some 8)
! # WARNING: Currently, 4-character tabs seem to be dominant
! # WARNING: But there are still lots of 8-character tabs
#written 11/3/2002 by Finlay
***************
*** 231,256 ****
# warn $code;
my %err;
if ($code eq 'BadBarcode'){
$err{badbarcode}=1;
$err{msg}= $messages->{'BadBarcode'};
! }
! if ($code eq 'NotIssued'){
$err{notissued}=1;
$err{msg}=
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
! }
! if ($code eq 'WasLost'){
$err{waslost}=1;
! }
! if ($code eq 'wthdrawn'){
$err{withdrawn}=1;
! last;
! }
! if (($code eq 'IsPermanent') && (not $messages->{'ResFound'})) {
if ($messages->{'IsPermanent'} ne $branch) {
$err{ispermanent}=1;
$err{msg}=$branches->{$messages->{'IsPermanent'}}->{'branchname'} ;
}
}
push (@errmsgloop, \%err);
}
$template->param(errmsgloop => address@hidden);
--- 233,262 ----
# warn $code;
my %err;
+ my $exit_required_p = 0;
if ($code eq 'BadBarcode'){
$err{badbarcode}=1;
$err{msg}= $messages->{'BadBarcode'};
! } elsif ($code eq 'NotIssued'){
$err{notissued}=1;
$err{msg}=
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
! } elsif ($code eq 'WasLost'){
$err{waslost}=1;
! } elsif ($code eq 'WasReturned'){
! ; # FIXME... anything to do here?
! } elsif ($code eq 'WasTransfered'){
! ; # FIXME... anything to do here?
! } elsif ($code eq 'wthdrawn'){
$err{withdrawn}=1;
! $exit_required_p = 1;
! } elsif (($code eq 'IsPermanent') && (not $messages->{'ResFound'})) {
if ($messages->{'IsPermanent'} ne $branch) {
$err{ispermanent}=1;
$err{msg}=$branches->{$messages->{'IsPermanent'}}->{'branchname'} ;
}
+ } else {
+ die "Unknown error code $code"; # XXX
}
push (@errmsgloop, \%err);
+ last if $exit_required_p;
}
$template->param(errmsgloop => address@hidden);
***************
*** 385,388 ****
# Local Variables:
! # tab-width: 8
# End:
--- 391,394 ----
# Local Variables:
! # tab-width: 4
# End:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/circ returns.pl,1.26,1.27,
Ambrose Li <=