my %queues;
my @ingest_queue;
+ my %bib_sources;
+ my $editor = new_editor();
+ my $sources = $editor->search_config_bib_source({id => {'!=' => undef}});
+ foreach my $src (@$sources) {
+ $bib_sources{$src->id} = $src->source;
+ }
+
my $ingest_ses = OpenSRF::AppSession->connect('open-ils.ingest');
for my $rec_id (@$rec_ids) {
if(defined $overlay_target) {
$logger->info("vl: overlaying record $overlay_target");
$record = OpenILS::Application::Cat::BibCommon->biblio_record_replace_marc(
- $e, $overlay_target, $rec->marc); #$rec->bib_source
+ $e, $overlay_target, $rec->marc, $bib_sources{$rec->bib_source});
} else {
$logger->info("vl: importing new record");
$record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import(
- $e, $rec->marc); #$rec->bib_source
+ $e, $rec->marc, $bib_sources{$rec->bib_source});
}
if($U->event_code($record)) {
}
var self = this;
win.xulG = {
- record : {marc : li.marc()},
+ record : {marc : li.marc(), "rtype": "bre"},
save : {
label: 'Save Record', // XXX I18N
func: function(xmlString) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ var type;
+ if (currentType == 'bib') {
+ type = 'bre';
+ } else {
+ type = 'are';
+ }
+
function onsave(r) {
// after the record is saved, reload the HTML display
var stat = r.recv().content();
}
win.xulG = {
- record : {marc : rec.marc()},
+ record : {marc : rec.marc(), "rtype": type},
save : {
label: dojo.byId('vl-marc-edit-save-label').innerHTML,
func: function(xmlString) {