Bugzilla – Attachment 6859 Details for
Bug 6142
CanBookBeReserved function is redefined in C4/ILSDI/Utility.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug #6142 - Delete sub CanBookBeReserved and delete function's reference on @EXPORT
Bug-6142---Delete-sub-CanBookBeReserved-and-delete.patch (text/plain), 3.01 KB, created by
Chris Cormack
on 2011-12-19 07:12:38 UTC
(
hide
)
Description:
Bug #6142 - Delete sub CanBookBeReserved and delete function's reference on @EXPORT
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-12-19 07:12:38 UTC
Size:
3.01 KB
patch
obsolete
>From d21cc76bd96ecb696d7dfc36ab04773a9af503db Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Fri, 8 Apr 2011 14:02:19 +0200 >Subject: [PATCH] Bug #6142 - Delete sub CanBookBeReserved and delete > function's reference on @EXPORT >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Original-Author: Alex Arnaud <alex.arnaud@biblibre.com>, Stéphane Delaune <stephane.delaune@biblibre.com> >Original-Signed-off-by: MJ Ray <mjr@phonecoop.coop> > >Correct use statement bug found by Ian Walls > >Author: MJ Ray <mjr@phonecoop.coop> >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/ILSDI/Utility.pm | 54 ++------------------------------------------------ > 1 files changed, 3 insertions(+), 51 deletions(-) > >diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm >index bacabac..37220c6 100644 >--- a/C4/ILSDI/Utility.pm >+++ b/C4/ILSDI/Utility.pm >@@ -1,6 +1,7 @@ > package C4::ILSDI::Utility; > > # Copyright 2009 SARL Biblibre >+# Copyright 2011 software.coop and MJ Ray > # > # This file is part of Koha. > # >@@ -24,7 +25,7 @@ use C4::Members; > use C4::Items; > use C4::Circulation; > use C4::Biblio; >-use C4::Reserves qw(GetReservesFromBorrowernumber); >+use C4::Reserves qw(GetReservesFromBorrowernumber CanBookBeReserved); > use C4::Context; > use C4::Branch qw/GetBranchName/; > use Digest::MD5 qw(md5_base64); >@@ -38,7 +39,7 @@ BEGIN { > require Exporter; > @ISA = qw(Exporter); > @EXPORT = qw( >- &BorrowerExists &CanBookBeReserved &Availability >+ &BorrowerExists &Availability > ); > } > >@@ -67,55 +68,6 @@ sub BorrowerExists { > return $sth->fetchrow; > } > >-=head2 CanBookBeReserved >- >-Checks if a book (at bibliographic level) can be reserved by a borrower. >- >- if ( CanBookBeReserved($borrower, $biblionumber) ) { >- # Do stuff >- } >- >-=cut >- >-sub CanBookBeReserved { >- my ( $borrower, $biblionumber ) = @_; >- >- my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves"); >- my $MAXOUTSTANDING = C4::Context->preference("maxoutstanding"); >- >- my $out = 1; >- >- if ( $borrower->{'amountoutstanding'} > $MAXOUTSTANDING ) { >- $out = undef; >- } >- if ( $borrower->{gonenoaddress} eq 1 ) { >- $out = undef; >- } >- if ( $borrower->{lost} eq 1 ) { >- $out = undef; >- } >- if ( $borrower->{debarred} ) { >- $out = undef; >- } >- my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} ); >- if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { >- $out = undef; >- } >- foreach my $res (@reserves) { >- if ( $res->{'biblionumber'} == $biblionumber ) { >- $out = undef; >- } >- } >- my $issues = GetPendingIssues( $borrower->{'borrowernumber'} ); >- foreach my $issue (@$issues) { >- if ( $issue->{'biblionumber'} == $biblionumber ) { >- $out = undef; >- } >- } >- >- return $out; >-} >- > =head2 Availability > > Returns, for an itemnumber, an array containing availability information. >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6142
:
3833
|
4594
|
4596
|
6027
|
6817
| 6859