[open-ils-commits] r11295 - trunk/Open-ILS/src/perlmods/OpenILS/Utils
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 20 17:27:52 EST 2008
Author: erickson
Date: 2008-11-20 17:27:48 -0500 (Thu, 20 Nov 2008)
New Revision: 11295
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm
Log:
remove the caching layer
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm 2008-11-20 22:27:05 UTC (rev 11294)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm 2008-11-20 22:27:48 UTC (rev 11295)
@@ -12,9 +12,7 @@
use OpenILS::Const qw/:const/;
my $U = "OpenILS::Application::AppUtils";
-my $grp_penalty_thresholds = {};
-
# calculate and update the well-known penalties
sub calculate_penalties {
my($class, $e, $user_id, $user) = @_;
@@ -88,9 +86,9 @@
}
# get the ranged set of penalties for a give group
+# XXX this could probably benefit from a stored proc
sub get_group_penalty_thresholds {
my($class, $e, $grp_id) = @_;
-# return $grp_penalty_thresholds->{$grp_id} if $grp_penalty_thresholds->{$grp_id};
my @thresholds;
my $cur_grp = $grp_id;
do {
@@ -100,7 +98,6 @@
}
} while(defined ($cur_grp = $e->retrieve_permission_grp_tree($cur_grp)->parent));
-# return $grp_penalty_thresholds->{$grp_id} = \@thresholds;
return \@thresholds;
}
@@ -109,6 +106,7 @@
# into the fatal_penalties set. Others will be sorted into the info_penalties set
sub retrieve_penalties {
my($class, $e, $user_id, @fatal_mask) = @_;
+
my $penalties = $e->search_actor_user_standing_penalty([
{usr => $user_id},
{flesh => 1, flesh_fields => {ausp => ['standing_penalty']}}
More information about the open-ils-commits
mailing list