From: erickson Date: Fri, 4 Jun 2010 13:28:37 +0000 (+0000) Subject: added granularity and user_data options to create_events_for_hook wrapper X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2b5cd99c2471704fe3dcb960680f5bdfa932eb1b;p=evergreen%2Fbjwebb.git added granularity and user_data options to create_events_for_hook wrapper git-svn-id: svn://svn.open-ils.org/ILS/trunk@16590 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index dc7058f78..a888cfa5a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -4168,13 +4168,13 @@ sub user_visible_circs { if($is_hold) { my $hold = $e->retrieve_action_hold_request($id); - $U->create_events_for_hook('ahr.format.history.email', $hold, $hold->request_lib, 1); + $U->create_events_for_hook('ahr.format.history.email', $hold, $hold->request_lib, undef, undef, 1); # events will be fired from action_trigger_runner } else { my $circ = $e->retrieve_action_circulation($id); - $U->create_events_for_hook('circ.format.history.email', $circ, $circ->circ_lib, 1); + $U->create_events_for_hook('circ.format.history.email', $circ, $circ->circ_lib, undef, undef, 1); # events will be fired from action_trigger_runner } } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index a2a954223..e648a8f18 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -1667,9 +1667,10 @@ sub fire_object_event { sub create_events_for_hook { - my($self, $hook, $obj, $org_id, $wait) = @_; + my($self, $hook, $obj, $org_id, $granularity, $user_data, $wait) = @_; my $ses = OpenSRF::AppSession->create('open-ils.trigger'); - my $req = $ses->request('open-ils.trigger.event.autocreate', $hook, $obj, $org_id); + my $req = $ses->request('open-ils.trigger.event.autocreate', + $hook, $obj, $org_id, $granularity, $user_data); return undef unless $wait; my $resp = $req->recv; return $resp->content if $resp; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index 7e10d6f4f..b9f130582 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -492,7 +492,7 @@ sub format_payment_receipt { } elsif ($for_email) { for my $p (@$payments) { - $U->create_events_for_hook('money.format.payment_receipt.email', $p, $p->xact->usr->home_ou, 1); + $U->create_events_for_hook('money.format.payment_receipt.email', $p, $p->xact->usr->home_ou, undef, undef, 1); } }