[open-ils-commits] r11541 - in branches/rel_1_4/Open-ILS: src/perlmods/OpenILS/Application src/perlmods/OpenILS/WWW web/vandelay/inc

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Dec 12 14:35:49 EST 2008


Author: erickson
Date: 2008-12-12 14:35:45 -0500 (Fri, 12 Dec 2008)
New Revision: 11541

Modified:
   branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
   branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/WWW/Vandelay.pm
   branches/rel_1_4/Open-ILS/web/vandelay/inc/upload.xml
Log:
added bib_source to upload form and queued_bib_record create functions

Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2008-12-12 17:33:58 UTC (rev 11540)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2008-12-12 19:35:45 UTC (rev 11541)
@@ -109,6 +109,7 @@
 	my $queue = shift;
 	my $marc = shift;
 	my $purpose = shift;
+    my $bib_source = shift;
 
 	my $e = new_editor(authtoken => $auth, xact => 1);
 
@@ -119,7 +120,7 @@
 		($e->allowed('CREATE_BIB_IMPORT_QUEUE', undef, $queue) ||
 		 $e->allowed('CREATE_BIB_IMPORT_QUEUE'));
 
-	my $new_rec = _add_bib_rec($e, $marc, $queue->id, $purpose);
+	my $new_rec = _add_bib_rec($e, $marc, $queue->id, $purpose, $bib_source);
 
 	return $e->die_event unless ($new_rec);
 	$e->commit;
@@ -137,11 +138,13 @@
 	my $marc = shift;
 	my $queue = shift;
 	my $purpose = shift;
+    my $bib_source = shift;
 
 	my $rec = new Fieldmapper::vandelay::queued_bib_record();
 	$rec->marc( $marc );
 	$rec->queue( $queue );
 	$rec->purpose( $purpose ) if ($purpose);
+    $rec->bib_source($bib_source);
 
 	return $e->create_vandelay_queued_bib_record( $rec );
 }
@@ -220,6 +223,7 @@
     my $data = $cache->get_cache('vandelay_import_spool_' . $fingerprint);
 	my $purpose = $data->{purpose};
     my $filename = $data->{path};
+    my $bib_source = $data->{bib_source};
 
     unless(-r $filename) {
         $logger->error("unable to read MARC file $filename");
@@ -251,7 +255,7 @@
 			$xml =~ s/[\x00-\x1f]//go;
 
 			if ($type eq 'bib') {
-				_add_bib_rec( $e, $xml, $queue_id, $purpose ) or return $e->die_event;
+				_add_bib_rec( $e, $xml, $queue_id, $purpose, $bib_source ) or return $e->die_event;
 			} else {
 				_add_auth_rec( $e, $xml, $queue_id, $purpose ) or return $e->die_event;
 			}

Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/WWW/Vandelay.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/WWW/Vandelay.pm	2008-12-12 17:33:58 UTC (rev 11540)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/WWW/Vandelay.pm	2008-12-12 19:35:45 UTC (rev 11541)
@@ -65,6 +65,7 @@
     my $data_fingerprint = '';
 	my $purpose = $cgi->param('purpose');
 	my $infile = $cgi->param('marc_upload');
+    my $bib_source = $cgi->param('bib_source');
 
 	my $conf = OpenSRF::Utils::SettingsClient->new;
 	my $dir = $conf->config_value(
@@ -100,7 +101,10 @@
 
 	    OpenSRF::Utils::Cache->new->put_cache(
 		    'vandelay_import_spool_' . $data_fingerprint,
-		    { purpose => $purpose, path => $outfile }
+		    {   purpose => $purpose, 
+                path => $outfile,
+                bib_source => $bib_source
+            }
 	    );
     }
 

Modified: branches/rel_1_4/Open-ILS/web/vandelay/inc/upload.xml
===================================================================
--- branches/rel_1_4/Open-ILS/web/vandelay/inc/upload.xml	2008-12-12 17:33:58 UTC (rev 11540)
+++ branches/rel_1_4/Open-ILS/web/vandelay/inc/upload.xml	2008-12-12 19:35:45 UTC (rev 11541)
@@ -32,7 +32,7 @@
         <tr>
             <td>&vandelay.import.bib_sources;</td>
             <td>
-                <select jsId='vlUploadSourceSelector' dojoType='dijit.form.FilteringSelect' labelAttr='source' searchAttr='source'>
+                <select name='bib_source' jsId='vlUploadSourceSelector' dojoType='dijit.form.FilteringSelect' labelAttr='source' searchAttr='source'>
                 </select>
             </td>
         </tr>



More information about the open-ils-commits mailing list