[open-ils-commits] r17094 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Aug 5 10:17:39 EDT 2010


Author: erickson
Date: 2010-08-05 10:17:37 -0400 (Thu, 05 Aug 2010)
New Revision: 17094

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
removed some deprecated code

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-08-05 07:50:37 UTC (rev 17093)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-08-05 14:17:37 UTC (rev 17094)
@@ -1788,55 +1788,7 @@
 	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",
     authoritative => 1,
@@ -1894,87 +1846,7 @@
 }
 
 
-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, at 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",
     api_name      => "open-ils.actor.user.checked_in_with_fines",



More information about the open-ils-commits mailing list