direct function calls to prevent any issues with $self. removed some unused code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 Feb 2008 20:57:29 +0000 (20:57 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 Feb 2008 20:57:29 +0000 (20:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8704 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm

index 11d9b10..5a62456 100644 (file)
@@ -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 = ". 
index 94779cf..325bed4 100644 (file)
@@ -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;
index 096c7ca..f37d2df 100644 (file)
@@ -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);
 
 }
 
index ff3ad4e..f2e60aa 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();
-       $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;
 }