[open-ils-commits] r7760 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 5 11:36:21 EDT 2007
Author: erickson
Date: 2007-09-05 11:29:24 -0400 (Wed, 05 Sep 2007)
New Revision: 7760
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
backporting: svn merge -r7758:7759 svn://svn.open-ils.org/ILS/trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2007-09-05 15:26:45 UTC (rev 7759)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2007-09-05 15:29:24 UTC (rev 7760)
@@ -1454,11 +1454,21 @@
my( $self, $conn, $auth, $label, $record_id, $org_id ) = @_;
my $e = new_editor(authtoken=>$auth, xact=>1);
return $e->die_event unless $e->checkauth;
+
+ my $vol;
+
+ if($record_id == OILS_PRECAT_RECORD) {
+
+ $vol = $e->retrieve_asset_call_number(OILS_PRECAT_CALL_NUMBER)
+ or return $e->die_event;
+
+ } else {
- my $vol = $e->search_asset_call_number(
- {label => $label, record => $record_id, owning_lib => $org_id, deleted => 'f'},
- {idlist=>1}
- )->[0];
+ $vol = $e->search_asset_call_number(
+ {label => $label, record => $record_id, owning_lib => $org_id, deleted => 'f'},
+ {idlist=>1}
+ )->[0];
+ }
# If the volume exists, return the ID
if( $vol ) { $e->rollback; return $vol; }
@@ -1474,12 +1484,6 @@
$vol->label($label);
$vol->record($record_id);
- #$vol->creator($e->requestor->id);
- #$vol->create_date('now');
- #$vol->editor($e->requestor->id);
- #$vol->edit_date('now');
- #$e->create_asset_call_number($vol) or return $e->die_event;
-
my $evt = create_volume( 0, $e, $vol );
return $evt if $evt;
More information about the open-ils-commits
mailing list