From e608c1fde5708c7a241910dbcd493b02ee274b99 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 5 Aug 2010 14:17:37 +0000 Subject: [PATCH] removed some deprecated code git-svn-id: svn://svn.open-ils.org/ILS/trunk@17094 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 128 --------------------- 1 file changed, 128 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 36f374f10..00574e5ba 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -1788,54 +1788,6 @@ sub hold_request_count { return { total => scalar(@$holds), ready => scalar(@ready) }; } - -__PACKAGE__->register_method( - method => "checkedout_count", - api_name => "open-ils.actor.user.checked_out.count__", - argc => 1, - signature => { - desc => "[DEPRECATED] For a given user, returns the total number of items checked out, " - . ' and the total number of items overdue', - params => [ - { desc => 'Authentication Token', type => 'string'}, - { desc => 'User ID', type => 'string'}, - ], - return => { - desc => 'Counts of total checked out and overdue, like { total => $i, overdue => $j }', - }, - } -); - - -# XXX Deprecate Me -sub checkedout_count { - my( $self, $client, $login_session, $userid ) = @_; - - my( $user_obj, $target, $evt ) = $apputils->checkses_requestor( - $login_session, $userid, 'VIEW_CIRCULATIONS' ); - return $evt if $evt; - - my $circs = $apputils->simple_scalar_request( - "open-ils.cstore", - "open-ils.cstore.direct.action.circulation.search.atomic", - { usr => $userid, stop_fines => undef } - #{ usr => $userid, checkin_time => {"=" => undef } } - ); - - my $parser = DateTime::Format::ISO8601->new; - - my $overdue = 0; - for my $c (@$circs) { - my $due_dt = $parser->parse_datetime( cleanse_ISO8601( $c->due_date ) ); - if ($due_dt->epoch < DateTime->today->epoch) { - $overdue++; - } - } - - return { total => scalar(@$circs), overdue => $overdue }; -} - - __PACKAGE__->register_method( method => "checked_out", api_name => "open-ils.actor.user.checked_out", @@ -1894,86 +1846,6 @@ sub _checked_out { } -sub _checked_out_WHAT { - my( $iscount, $e, $userid ) = @_; - - my $circs = $e->search_action_circulation( - { usr => $userid, stop_fines => undef }); - - my $mcircs = $e->search_action_circulation( - { - usr => $userid, - checkin_time => undef, - xact_finish => undef, - }); - - - push( @$circs, @$mcircs ); - - my $parser = DateTime::Format::ISO8601->new; - - # split the circs up into overdue and not-overdue circs - my (@out,@overdue); - for my $c (@$circs) { - if( $c->due_date ) { - my $due_dt = $parser->parse_datetime( cleanse_ISO8601( $c->due_date ) ); - my $due = $due_dt->epoch; - if ($due < DateTime->today->epoch) { - push @overdue, $c->id; - } else { - push @out, $c->id; - } - } else { - push @out, $c->id; - } - } - - # grab all of the lost, claims-returned, and longoverdue circs - #my $open = $e->search_action_circulation( - # {usr => $userid, stop_fines => { '!=' => undef }, xact_finish => undef }); - - - # these items have stop_fines, but no xact_finish, so money - # is owed on them and they have not been checked in - my $open = $e->search_action_circulation( - { - usr => $userid, - stop_fines => { in => [ qw/LOST CLAIMSRETURNED LONGOVERDUE/ ] }, - xact_finish => undef, - checkin_time => undef, - } - ); - - - my( @lost, @cr, @lo ); - for my $c (@$open) { - push( @lost, $c->id ) if $c->stop_fines eq 'LOST'; - push( @cr, $c->id ) if $c->stop_fines eq 'CLAIMSRETURNED'; - push( @lo, $c->id ) if $c->stop_fines eq 'LONGOVERDUE'; - } - - - if( $iscount ) { - return { - total => @$circs + @lost + @cr + @lo, - out => scalar(@out), - overdue => scalar(@overdue), - lost => scalar(@lost), - claims_returned => scalar(@cr), - long_overdue => scalar(@lo) - }; - } - - return { - out => \@out, - overdue => \@overdue, - lost => \@lost, - claims_returned => \@cr, - long_overdue => \@lo - }; -} - - __PACKAGE__->register_method( method => "checked_in_with_fines", -- 2.11.0