[open-ils-commits] r17348 - branches/rel_1_6_1/Open-ILS/src/perlmods/OpenILS/Application/Circ (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Aug 26 10:55:58 EDT 2010


Author: senator
Date: 2010-08-26 10:55:55 -0400 (Thu, 26 Aug 2010)
New Revision: 17348

Modified:
   branches/rel_1_6_1/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
Backport r17346 to fix broken OPAC renewals


Modified: branches/rel_1_6_1/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6_1/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-26 14:51:28 UTC (rev 17347)
+++ branches/rel_1_6_1/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-26 14:55:55 UTC (rev 17348)
@@ -237,7 +237,18 @@
     # 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/;



More information about the open-ils-commits mailing list