sub run_method {
- my( $self, $conn, $auth, $args, $oargs ) = @_;
+ my( $self, $conn, $auth, $args ) = @_;
translate_legacy_args($args);
- $oargs = { all => 1 } unless defined $oargs;
+ $args->{override_args} = { all => 1 } unless defined $args->{override_args};
my $api = $self->api_name;
my $circulator =
- OpenILS::Application::Circ::Circulator->new($auth, %$args, $oargs);
+ OpenILS::Application::Circ::Circulator->new($auth, %$args);
return circ_events($circulator) if $circulator->bail_out;
sub new {
- my( $class, $auth, %args, $oargs ) = @_;
+ my( $class, $auth, %args ) = @_;
$class = ref($class) || $class;
my $self = bless( {}, $class );
$self->events([]);
$self->editor(new_editor(xact => 1, authtoken => $auth));
- $self->override_args($oargs);
unless( $self->editor->checkauth ) {
$self->bail_on_events($self->editor->event);
# FIXME: specify proper usage/interaction of selection_ou and pickup_lib
sub check_title_hold {
- my( $self, $client, $authtoken, $params, $oargs ) = @_;
+ my( $self, $client, $authtoken, $params ) = @_;
my $e = new_editor(authtoken=>$authtoken);
return $e->event unless $e->checkauth;
- $oargs = {} unless defined $oargs;
+
+ my %params = %$params;
+ my $depth = $params{depth} || 0;
+ my $selection_ou = $params{selection_ou} || $params{pickup_lib};
+ my $oargs = $params{oargs} || {};
if($oargs->{events}) {
@{$oargs->{events}} = grep { $e->allowed($_ . '.override', $e->requestor->ws_ou); } @{$oargs->{events}};
}
- my %params = %$params;
- my $depth = $params{depth} || 0;
- my $selection_ou = $params{selection_ou} || $params{pickup_lib};
my $patron = $e->retrieve_actor_user($params{patronid})
or return $e->event;
my $depth = $soft_boundary;
while($depth >= $min_depth) {
$logger->info("performing hold possibility check with soft boundary $depth");
- @status = do_possibility_checks($e, $patron, $request_lib, $depth, %params, $oargs);
+ @status = do_possibility_checks($e, $patron, $request_lib, $depth, %params);
if ($status[0]) {
$return_depth = $depth;
last;
} elsif(defined $hard_boundary and $depth < $hard_boundary) {
# there is no soft boundary, enforce the hard boundary if it exists
$logger->info("performing hold possibility check with hard boundary $hard_boundary");
- @status = do_possibility_checks($e, $patron, $request_lib, $hard_boundary, %params, $oargs);
+ @status = do_possibility_checks($e, $patron, $request_lib, $hard_boundary, %params);
} else {
# no boundaries defined, fall back to user specifed boundary or no boundary
$logger->info("performing hold possibility check with no boundary");
- @status = do_possibility_checks($e, $patron, $request_lib, $params{depth}, %params, $oargs);
+ @status = do_possibility_checks($e, $patron, $request_lib, $params{depth}, %params);
}
my $place_unfillable = 0;
sub do_possibility_checks {
- my($e, $patron, $request_lib, $depth, %params, $oargs) = @_;
+ my($e, $patron, $request_lib, $depth, %params) = @_;
my $issuanceid = $params{issuanceid} || "";
my $partid = $params{partid} || "";
my $hold_type = $params{hold_type} || 'T';
my $selection_ou = $params{selection_ou} || $pickup_lib;
my $holdable_formats = $params{holdable_formats};
+ my $oargs = $params{oargs} || {};
my $copy;