[open-ils-commits] r8704 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 8 16:26:15 EST 2008
Author: erickson
Date: 2008-02-08 15:57:29 -0500 (Fri, 08 Feb 2008)
New Revision: 8704
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm
Log:
direct function calls to prevent any issues with $self. removed some unused code
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2008-02-08 20:51:54 UTC (rev 8703)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2008-02-08 20:57:29 UTC (rev 8704)
@@ -86,7 +86,7 @@
$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 = ".
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm 2008-02-08 20:51:54 UTC (rev 8703)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm 2008-02-08 20:57:29 UTC (rev 8704)
@@ -58,39 +58,6 @@
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 @@
# 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;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2008-02-08 20:51:54 UTC (rev 8703)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2008-02-08 20:57:29 UTC (rev 8704)
@@ -55,7 +55,7 @@
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 @@
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 @@
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 @@
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 @@
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);
}
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm 2008-02-08 20:51:54 UTC (rev 8703)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Transit.pm 2008-02-08 20:57:29 UTC (rev 8704)
@@ -44,7 +44,7 @@
($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;
}
More information about the open-ils-commits
mailing list