return XML::LibXML->new->parse_string($xml)->documentElement->toString;
}
-my $__bib_sources;
-sub bib_source_from_name {
- my $name = shift;
- $logger->debug("searching for bib source: $name");
-
- fetch_bib_sources();
-
- my ($s) = grep { lc($_->source) eq lc($name) } @$__bib_sources;
-
- return $s->id if $s;
- return undef;
-}
__PACKAGE__->register_method(
api_name => 'open-ils.cat.bib_sources.retrieve.all');
sub fetch_bib_sources {
- $__bib_sources = new_editor()->retrieve_all_config_bib_source()
- unless $__bib_sources;
- return $__bib_sources;
+ return OpenILS::Application::Cat::BibCommon->fetch_bib_sources();
}
-
-
__PACKAGE__->register_method(
method => "create_record_xml",
api_name => "open-ils.cat.biblio.record.xml.create.override",
# Shared bib mangling code. Do not publish methods from here.
# ---------------------------------------------------------------------------
+my $__bib_sources;
+sub bib_source_from_name {
+ my $name = shift;
+ $logger->debug("searching for bib source: $name");
+
+ fetch_bib_sources();
+
+ my ($s) = grep { lc($_->source) eq lc($name) } @$__bib_sources;
+
+ return $s->id if $s;
+ return undef;
+}
+
+sub fetch_bib_sources {
+ $__bib_sources = new_editor()->retrieve_all_config_bib_source()
+ unless $__bib_sources;
+ return $__bib_sources;
+}
+
sub biblio_record_replace_marc {
my($class, $e, $recid, $newxml, $source, $fixtcn, $override) = @_;
return 0;
}
-
+1;