From bb222e7580187965e3e722a76505ee634beb5987 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 6 Jun 2013 09:21:37 -0400 Subject: [PATCH] LP#1187035 Remove OpenILS::Utils::Editor part 2. * Address 2 places where we were calling $e->request with a CStoreEditor for a storage method. Since CStoreEditor assumes all calls go to open-ils.cstore, these would have failed. * While we're in a cleaning mood, remove some obsolete commented code. Signed-off-by: Bill Erickson Signed-off-by: Jeff Godin --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm | 8 ++++++-- .../src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm | 8 ++++++-- .../src/perlmods/lib/OpenILS/Application/Search/Zips.pm | 4 ---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm index ad848fdff1..c82a695075 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm @@ -743,8 +743,12 @@ __PACKAGE__->register_method( sub circ_count { my( $self, $client, $copyid, $range ) = @_; - my $e = new_editor(); - return $e->request('open-ils.storage.asset.copy.circ_count', $copyid, $range); + + return $U->simplereq( + 'open-ils.storage', + 'open-ils.storage.asset.copy.circ_count', + $copyid, $range + ); } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm index 8da4acb504..26b85d2cd7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm @@ -231,8 +231,12 @@ sub fetch_open_noncats { if( $e->requestor->id ne $userid ) { return $e->event unless $e->allowed('VIEW_CIRCULATIONS'); # XXX rely on editor perm } - return $e->request( - 'open-ils.storage.action.open_non_cataloged_circulation.user', $userid ); + + return $U->simplereq( + 'open-ils.storage', + 'open-ils.storage.action.open_non_cataloged_circulation.user', + $userid + ); } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm index 4cfa23a633..9baa9cd29a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm @@ -60,10 +60,6 @@ __PACKAGE__->register_method( / ); sub search_zip { - #my( $self, $conn, $auth, $zip ) = @_; - #my $e = new_editor(authtoken=>$auth); - #return $e->event unless $e->checkauth; - #return $e->event unless $e->allowed('VIEW_ZIP_DATA'); my( $self, $conn, $zip ) = @_; $zip =~ s/(^\d{5}).*/$1/; # we don't care about the last 4 digits if they exist return $zips{$zip}; -- 2.43.2