Add the session to Circ set_audit_info calls
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 20 Mar 2012 22:42:28 +0000 (18:42 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 21 Mar 2012 12:33:11 +0000 (08:33 -0400)
Because I apparently wasn't thinking about how I wrote the apputils piece
when I added them.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm

index d400853..b8cc573 100644 (file)
@@ -586,7 +586,7 @@ sub create_grocery_bill {
 
     $transaction->clear_id;
     my $session = $apputils->start_db_session;
-    $apputils->set_audit_info($login, $staff->id, $staff->wsid);
+    $apputils->set_audit_info($session, $login, $staff->id, $staff->wsid);
     my $transid = $session->request(
         'open-ils.storage.direct.money.grocery.create', $transaction)->gather(1);
 
index aadb8c7..d0a843e 100644 (file)
@@ -177,7 +177,7 @@ sub stat_cat_create {
 
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $newid = _create_stat_cat($session, $stat_cat, $method);
 
        if( ref($stat_cat->entries) ) {
@@ -297,7 +297,7 @@ sub update_stat_entry {
        return $evt if $evt;
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $req = $session->request($method, $entry); 
        my $status = $req->gather(1);
        $apputils->commit_db_session($session);
@@ -330,7 +330,7 @@ sub update_stat {
        return $evt if $evt;
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $req = $session->request($method, $cat); 
        my $status = $req->gather(1);
        $apputils->commit_db_session($session);
@@ -364,7 +364,7 @@ sub create_stat_entry {
 
        $entry->clear_id();
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $req = $session->request($method, $entry); 
        my $status = $req->gather(1);
        $apputils->commit_db_session($session);
@@ -420,7 +420,7 @@ sub create_stat_map {
        $map->clear_id();
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $req = $session->request($method, $map); 
        my $newid = $req->gather(1);
        warn "Created new stat cat map with id $newid\n";
@@ -471,7 +471,7 @@ sub update_stat_map {
 
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $req = $session->request($method, $map); 
        my $newid = $req->gather(1);
        warn "Updated new stat cat map with id $newid\n";
index 98f046f..e09b9f6 100644 (file)
@@ -38,7 +38,7 @@ sub add_survey {
     return $evt if $evt;
 
        my $session = $apputils->start_db_session();
-       $apputils->set_audit_info($user_session, $user_obj->id, $user_obj->wsid);
+       $apputils->set_audit_info($session, $user_session, $user_obj->id, $user_obj->wsid);
        my $err = undef; my $id;
 
 
index e0900dc..428afed 100644 (file)
@@ -44,7 +44,7 @@ sub copy_transit_receive {
        ($copy, $evt) = $U->fetch_copy_by_barcode($params{barcode}) unless $copy;
        return $evt if $evt;
        my $session = $U->start_db_session();
-       $U->set_audit_info($authtoken, $requestor->id, $requestor->wsid);
+       $U->set_audit_info($session, $authtoken, $requestor->id, $requestor->wsid);
        $evt = transit_receive( $self, $copy, $requestor, $session );
        $U->commit_db_session($session) if $U->event_equals($evt,'SUCCESS');
        return $evt;
@@ -134,7 +134,7 @@ sub copy_transit_create {
        my $source              = $requestor->home_ou;
        my $dest                        = $params{destination} || $copy->circ_lib;
        my $transit             = Fieldmapper::action::transit_copy->new;
-       $U->set_audit_info($authtoken, $requestor->id, $requestor->wsid);
+       $U->set_audit_info($session, $authtoken, $requestor->id, $requestor->wsid);
 
        $logger->activity("User ". $requestor->id ." creating a ".
                " new copy transit for copy ".$copy->id." to org $dest");