From: erickson Date: Fri, 8 Feb 2008 20:57:29 +0000 (+0000) Subject: direct function calls to prevent any issues with $self. removed some unused code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6b879b7d7f9757fa6d67e95baabc1a71afb4381a;p=Evergreen.git direct function calls to prevent any issues with $self. removed some unused code git-svn-id: svn://svn.open-ils.org/ILS/trunk@8704 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index 11d9b10806..5a6245632c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -86,7 +86,7 @@ sub make_payments { $total_paid += $amount; - $trans = $self->fetch_mbts($client, $login, $transid); + $trans = fetch_mbts($self, $client, $login, $transid); return $trans if $U->event_code($trans); $logger->info("payment: processing transaction [$transid] with balance_owed = ". diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm index 94779cf547..325bed4487 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm @@ -58,39 +58,6 @@ __PACKAGE__->register_method( event on failure /); -sub __create_noncat_type { - my( $self, $client, $authtoken, $name, $orgId, $interval, $inhouse ) = @_; - my( $staff, $evt ) = $U->checkses($authtoken); - return $evt if $evt; - - # grab all of "my" non-cat types and see if one with - # the requested name already exists - my $types = $self->retrieve_noncat_types_all($client, $orgId); - for(@$types) { - if( $_->name eq $name ) { - return OpenILS::Event->new('NON_CAT_TYPE_EXISTS', payload => $name); - } - } - - $evt = $U->check_perms( $staff->id, $orgId, 'CREATE_NON_CAT_TYPE' ); - return $evt if $evt; - - my $type = Fieldmapper::config::non_cataloged_type->new; - $type->name($name); - $type->owning_lib($orgId); - $type->circ_duration($interval); - $type->in_house( ($inhouse) ? 't' : 'f' ); - - my $id = $U->simplereq( - 'open-ils.storage', - 'open-ils.storage.direct.config.non_cataloged_type.create', $type ); - - return $U->DB_UPDATE_FAILED($type) unless $id; - $type->id($id); - return $type; -} - - sub create_noncat_type { my( $self, $client, $authtoken, $name, $orgId, $interval, $inhouse ) = @_; @@ -100,7 +67,7 @@ sub create_noncat_type { # grab all of "my" non-cat types and see if one with # the requested name already exists - my $types = $self->retrieve_noncat_types_all($client, $orgId); + my $types = retrieve_noncat_types_all($self, $client, $orgId); for(@$types) { if( $_->name eq $name ) { $e->rollback; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm index 096c7ca8bd..f37d2df606 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm @@ -55,7 +55,7 @@ sub add_survey { if($err) { throw OpenSRF::EX::ERROR ($err); } # re-retrieve the survey from the db and return it - return $self->get_fleshed_survey( $client, $survey->id() ); + return get_fleshed_survey($self, $client, $survey->id() ); } @@ -161,7 +161,7 @@ sub get_required_surveys { my @fleshed; for my $survey (@$surveys) { - push(@fleshed, $self->get_fleshed_survey($client, $survey)); + push(@fleshed, get_fleshed_survey($self, $client, $survey)); } return \@fleshed; @@ -210,7 +210,7 @@ sub get_all_surveys { my @fleshed; for my $survey (@$surveys) { - push(@fleshed, $self->get_fleshed_survey($client, $survey)); + push(@fleshed, get_fleshed_survey($self, $client, $survey)); } return \@fleshed; } @@ -368,7 +368,7 @@ sub get_random_survey { warn "Random survey index for process $$ is $random\n"; my $surv = $surveys->[$random]; - return $self->get_fleshed_survey($client, $surv); + return get_fleshed_survey($self, $client, $surv); } @@ -390,7 +390,7 @@ sub get_random_survey_global { warn "Random survey index for process $$ is $random\n"; my $surv = $surveys->[$random]; - return $self->get_fleshed_survey($client, $surv); + return get_fleshed_survey($self, $client, $surv); } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm index ff3ad4eca8..f2e60aa3d8 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm +++ b/Open-ILS/src/perlmods/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(); - $evt = $self->transit_receive( $copy, $requestor, $session ); + $evt = transit_receive( $self, $copy, $requestor, $session ); $U->commit_db_session($session) if $U->event_equals($evt,'SUCCESS'); return $evt; }