From 5f44e1f246de64d4da469e0b10926730a78673ab Mon Sep 17 00:00:00 2001 From: senator Date: Thu, 26 Aug 2010 14:56:13 +0000 Subject: [PATCH] Backport r17346 to fix broken OPAC renewals git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@17349 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index db358fa47a..cf0ff9f975 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -237,7 +237,18 @@ sub run_method { # Go ahead and load the script runner to make sure we have all # of the objects we need # -------------------------------------------------------------------------- - $circulator->is_res_checkin($circulator->is_checkin(1)) if $api =~ /reservation.return/ or $circulator->seems_like_reservation(); + + # XXX I wanted to make this better so it might support blocking renewals + # if a reservation has been placed on an item, but that will need more + # design, as institutions will differ in their policy on that. In the + # meantime making sure we're trying some kind of checkin will at least + # keep OPAC renewals from breaking since patrons don't have VIEW_USER... + + $circulator->is_res_checkin($circulator->is_checkin(1)) + if $api =~ /reservation.return/ or ( + $api =~ /checkin/ and $circulator->seems_like_reservation() + ); + $circulator->is_res_checkout(1) if $api =~ /reservation.pickup/; $circulator->is_renewal(1) if $api =~ /renew/; -- 2.11.0