From ddf8bb071c0bd1e6bbac968e2b081170a7a3ab14 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Tue, 20 Mar 2012 18:42:28 -0400 Subject: [PATCH] Add the session to Circ set_audit_info calls Because I apparently wasn't thinking about how I wrote the apputils piece when I added them. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm | 2 +- .../src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm | 12 ++++++------ Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm | 2 +- .../src/perlmods/lib/OpenILS/Application/Circ/Transit.pm | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index d4008538a5..b8cc5730b3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -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); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm index aadb8c76b0..d0a843e5c5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm @@ -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"; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm index 98f046f2fa..e09b9f611c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm @@ -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; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm index e0900dcd32..428afed05b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm @@ -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"); -- 2.11.0