added granularity and user_data options to create_events_for_hook wrapper
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Jun 2010 13:28:37 +0000 (13:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Jun 2010 13:28:37 +0000 (13:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16590 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm

index dc7058f..a888cfa 100644 (file)
@@ -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
             }
         }
index a2a9542..e648a8f 100644 (file)
@@ -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;
index 7e10d6f..b9f1305 100644 (file)
@@ -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);
         }
     }