Bug 13116 [QA Followup] - Remove tabs, use unless instead of if
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
51f0a0b722
commit
3bc14af683
|
|
@ -465,9 +465,9 @@ sub CanBookBeReserved{
|
|||
push (@$items,@hostitems);
|
||||
}
|
||||
|
||||
my $canReserve;
|
||||
foreach my $item (@$items){
|
||||
$canReserve = CanItemBeReserved($borrowernumber, $item);
|
||||
my $canReserve;
|
||||
foreach my $item (@$items) {
|
||||
$canReserve = CanItemBeReserved( $borrowernumber, $item );
|
||||
return 'OK' if $canReserve eq 'OK';
|
||||
}
|
||||
return $canReserve;
|
||||
|
|
|
|||
|
|
@ -548,14 +548,11 @@ foreach my $biblioNum (@biblionumbers) {
|
|||
if ($biblioLoopIter{already_reserved}) {
|
||||
$biblioLoopIter{holdable} = undef;
|
||||
}
|
||||
my $canReserve = CanBookBeReserved($borrowernumber,$biblioNum);
|
||||
if ($canReserve eq 'OK') {
|
||||
#All is OK!
|
||||
}
|
||||
else {
|
||||
$biblioLoopIter{holdable} = undef;
|
||||
$biblioLoopIter{ $canReserve } = 1;
|
||||
}
|
||||
my $canReserve = CanBookBeReserved($borrowernumber,$biblioNum);
|
||||
unless ($canReserve eq 'OK') {
|
||||
$biblioLoopIter{holdable} = undef;
|
||||
$biblioLoopIter{ $canReserve } = 1;
|
||||
}
|
||||
if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
|
||||
$biblioLoopIter{holdable} = undef;
|
||||
$biblioLoopIter{already_patron_possession} = 1;
|
||||
|
|
|
|||
|
|
@ -191,20 +191,21 @@ foreach my $biblionumber (@biblionumbers) {
|
|||
|
||||
my $dat = GetBiblioData($biblionumber);
|
||||
|
||||
my $canReserve = CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber);
|
||||
if ($canReserve eq 'OK') {
|
||||
#All is OK and we can continue
|
||||
}
|
||||
elsif ( $canReserve eq 'tooManyReserves' ) {
|
||||
$maxreserves = 1;
|
||||
my $canReserve = CanBookBeReserved( $borrowerinfo->{borrowernumber}, $biblionumber );
|
||||
if ( $canReserve eq 'OK' ) {
|
||||
|
||||
#All is OK and we can continue
|
||||
}
|
||||
elsif ( $canReserve eq 'tooManyReserves' ) {
|
||||
$maxreserves = 1;
|
||||
}
|
||||
elsif ( $canReserve eq 'ageRestricted' ) {
|
||||
$template->param( $canReserve => 1 );
|
||||
$biblioloopiter{$canReserve} = 1;
|
||||
}
|
||||
else {
|
||||
$biblioloopiter{$canReserve} = 1;
|
||||
}
|
||||
elsif ( $canReserve eq 'ageRestricted' ) {
|
||||
$template->param( $canReserve => 1 );
|
||||
$biblioloopiter{ $canReserve } = 1;
|
||||
}
|
||||
else {
|
||||
$biblioloopiter{ $canReserve } = 1;
|
||||
}
|
||||
|
||||
my $alreadypossession;
|
||||
if (not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowerinfo->{borrowernumber},$biblionumber)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue