[open-ils-commits] r16517 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 27 09:18:48 EDT 2010
Author: erickson
Date: 2010-05-27 09:18:46 -0400 (Thu, 27 May 2010)
New Revision: 16517
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
added note about new direction of opt-in circ history maintenance; minor cleanup
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-05-27 13:18:45 UTC (rev 16516)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-05-27 13:18:46 UTC (rev 16517)
@@ -3064,6 +3064,10 @@
}
+# XXX: The primary mechanism for storing circ history is now handled
+# by tracking real circulation objects instead of bibs in a bucket.
+# However, this code is disabled by default and could be useful
+# some day, so may as well leave it for now.
sub append_reading_list {
my $self = shift;
@@ -3073,17 +3077,15 @@
$self->copy and
!$self->is_noncat;
- my $e = new_editor(xact => 1, requestor => $self->editor->requestor);
# verify history is globally enabled and uses the bucket mechanism
my $htype = OpenSRF::Utils::SettingsClient->new->config_value(
apps => 'open-ils.circ' => app_settings => 'checkout_history_mechanism');
- unless($htype eq 'bucket') {
- $e->rollback;
- return undef;
- }
+ return undef unless $htype and $htype eq 'bucket';
+ my $e = new_editor(xact => 1, requestor => $self->editor->requestor);
+
# verify the patron wants to retain the hisory
my $setting = $e->search_actor_user_setting(
{usr => $self->patron->id, name => 'circ.keep_checkout_history'})->[0];
@@ -3130,12 +3132,9 @@
sub make_trigger_events {
my $self = shift;
return unless $self->circ;
- my $ses = OpenSRF::AppSession->create('open-ils.trigger');
- $ses->request('open-ils.trigger.event.autocreate', 'checkout', $self->circ, $self->circ_lib) if $self->is_checkout;
- $ses->request('open-ils.trigger.event.autocreate', 'checkin', $self->circ, $self->circ_lib) if $self->is_checkin;
- $ses->request('open-ils.trigger.event.autocreate', 'renewal', $self->circ, $self->circ_lib) if $self->is_renewal;
-
- # ignore response
+ $U->create_events_for_hook('checkout', $self->circ, $self->circ_lib) if $self->is_checkout;
+ $U->create_events_for_hook('checkin', $self->circ, $self->circ_lib) if $self->is_checkin;
+ $U->create_events_for_hook('renewal', $self->circ, $self->circ_lib) if $self->is_renewal;
}
More information about the open-ils-commits
mailing list