For API consistency, use 'oargs' for override args in circulate collab/berick/override-args-repairs-and-consistency
authorBill Erickson <berick@esilibrary.com>
Fri, 22 Jun 2012 15:18:26 +0000 (11:18 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 22 Jun 2012 15:18:26 +0000 (11:18 -0400)
Instead of 'override_args', use 'oargs', which is consistent with other
code that supports overrides.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index f5c0f07..85c9b54 100644 (file)
@@ -193,7 +193,7 @@ __PACKAGE__->register_method(
 sub run_method {
     my( $self, $conn, $auth, $args ) = @_;
     translate_legacy_args($args);
-    $args->{override_args} = { all => 1 } unless defined $args->{override_args};
+    $args->{oargs} = { all => 1 } unless defined $args->{oargs};
     my $api = $self->api_name;
 
     my $circulator = 
@@ -541,7 +541,7 @@ my @AUTOLOAD_FIELDS = qw/
     hold_as_transit
     fake_hold_dest
     limit_groups
-    override_args
+    oargs
 /;
 
 
@@ -1369,7 +1369,7 @@ sub override_events {
     my $self = shift;
     my @events = @{$self->events};
     return unless @events;
-    my $oargs = $self->override_args;
+    my $oargs = $self->oargs;
 
     if(!$self->override) {
         return $self->bail_out(1) 
@@ -1415,7 +1415,7 @@ sub handle_claims_returned {
     my $evt;
 
     # - If the caller has set the override flag, we will check the item in
-    if($self->override && ($self->override_args->{all} || grep { $_ eq 'CIRC_CLAIMS_RETURNED' } @{$self->override_args->{events}}) ) {
+    if($self->override && ($self->oargs->{all} || grep { $_ eq 'CIRC_CLAIMS_RETURNED' } @{$self->oargs->{events}}) ) {
 
         $CR->checkin_time('now');   
         $CR->checkin_scan_time('now');