LP 1485240: More Legacy Circ Script Removal
authorJason Stephenson <jason@sigio.com>
Sat, 15 Aug 2015 18:42:39 +0000 (14:42 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 17 Aug 2015 17:05:45 +0000 (13:05 -0400)
This commit removes the last few references to the script_runner
used by OpenILS::Application::Circ::Circulate::Circulator to run
JavaScript circ policies.  The script_runner is basically doing
nothing at this point.

To test this commit, apply it to a test system, install Evergreen,
start or restart the open-ils.circ service and check that check
outs and renewals still work.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 61ef659..f4b7503 100644 (file)
@@ -209,13 +209,6 @@ sub run_method {
             }
         }
     }
-            
-    
-
-    # --------------------------------------------------------------------------
-    # Go ahead and load the script runner to make sure we have all 
-    # of the objects we need
-    # --------------------------------------------------------------------------
 
     if ($circulator->use_booking) {
         $circulator->is_res_checkin($circulator->is_checkin(1))
@@ -296,8 +289,6 @@ sub run_method {
     
     $conn->respond_complete(circ_events($circulator));
 
-    $circulator->script_runner->cleanup if $circulator->script_runner;
-
     return undef if $circulator->bail_out;
 
     $circulator->do_hold_notify($circulator->notify_hold)
@@ -400,7 +391,6 @@ my @AUTOLOAD_FIELDS = qw/
     patron
     patron_id
     patron_barcode
-    script_runner
     volume
     title
     is_renewal
@@ -955,7 +945,6 @@ my $LEGACY_CIRC_EVENT_MAP = {
 # ---------------------------------------------------------------------
 sub run_patron_permit_scripts {
     my $self        = shift;
-    my $runner      = $self->script_runner;
     my $patronid    = $self->patron->id;
 
     my @allevents; 
@@ -1177,7 +1166,6 @@ sub get_max_fine_amount {
 sub run_copy_permit_scripts {
     my $self = shift;
     my $copy = $self->copy || return;
-    my $runner = $self->script_runner;
 
     my @allevents;
 
@@ -1720,7 +1708,6 @@ sub run_checkout_scripts {
     my $nobail = shift;
 
     my $evt;
-    my $runner = $self->script_runner;
 
     my $duration;
     my $recurring;
@@ -2140,10 +2127,6 @@ sub make_precat_copy {
         $self->push_events($self->editor->event);
         return;
     }   
-
-    # this is a little bit of a hack, but we need to 
-    # get the copy into the script runner
-    $self->script_runner->insert("environment.copy", $copy, 1) if $self->script_runner;
 }