removed some deprecated code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 14:17:37 +0000 (14:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 5 Aug 2010 14:17:37 +0000 (14:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17094 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index 36f374f..00574e5 100644 (file)
@@ -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",