Bug 6976 Close loophole allowing borrowers extra holds via opac
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 28 Aug 2012 13:34:55 +0000 (14:34 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 16 Sep 2012 08:00:27 +0000 (20:00 +1200)
commit1f3fcc3abe75f0e7edbf6f74fad0bcef082a2fa3
treea9f7a93a4f0e5ee911d92ae52fdfe67ba804e50c
parent92da15bec3084bb84366025b0adf77f784084d2b
Bug 6976 Close loophole allowing borrowers extra holds via opac

The check that the max number of reserves has
not been reached needs to take account of the fact
that we may have added enouch reserves to
reach the limit while this script is running.
Add a check against the incrementing count

The variable canreserve was only used when looping
through multiple holds but was not being
reinitialized on every iteration
make variable local to loop it is used in and
initialize to zero

Have used perltidy to correct the indention of
the while loop as it was misleading to the reader

Some numeric comparisons were using a string operator
fix them before strange bugs manifest themselves

The loophole manifests thus:
borrowers are only allowed Y holds.
If holds are done individually, it is
obeying that law i.e. X has held Y separate books –
 when I tried to do a 6th
book it told me that I could not place a hold.
However, if a borrower checks the catalogue,
gets the intial list up and clicks items on the “results”
box and then clicks “place hold” they can hold more than Y
items Please enter the commit message for your changes. Lines starting

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
opac/opac-reserve.pl