Bug 34836: Add patron check to isbd and marc detail pages
Test plan:
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a MARC detail or ISBD detail bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=76
http://localhost:8080/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=76
- Notice it blows up with error 500, on both occasions
- Apply patch. Repeat.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fadf73a95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b89e31393e
commit
0c8dda1dcc
|
|
@ -178,7 +178,7 @@ my $res = GetISBDView({
|
|||
my $items = $biblio->items;
|
||||
while ( my $item = $items->next ) {
|
||||
|
||||
$can_item_be_reserved = $can_item_be_reserved || IsAvailableForItemLevelRequest($item, $patron, undef);
|
||||
$can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest( $item, $patron, undef );
|
||||
}
|
||||
|
||||
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ my $can_item_be_reserved = 0;
|
|||
$items->reset;
|
||||
|
||||
while ( my $item = $items->next ) {
|
||||
$can_item_be_reserved = $can_item_be_reserved || IsAvailableForItemLevelRequest($item, $patron, undef);
|
||||
$can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest( $item, $patron, undef );
|
||||
}
|
||||
|
||||
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue