[open-ils-commits] r10655 - in
trunk/Open-ILS/src/perlmods/OpenILS/Application: . Cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Sep 20 02:04:00 EDT 2008
Author: phasefx
Date: 2008-09-20 02:03:57 -0400 (Sat, 20 Sep 2008)
New Revision: 10655
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
Log:
move these lingering methods from Cat.pm to Cat/BibCommon.pm and put a trailing 1; in BibCommon.pm
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2008-09-20 02:32:49 UTC (rev 10654)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2008-09-20 06:03:57 UTC (rev 10655)
@@ -15,7 +15,26 @@
# 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) = @_;
@@ -271,4 +290,4 @@
return 0;
}
-
+1;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-09-20 02:32:49 UTC (rev 10654)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-09-20 06:03:57 UTC (rev 10655)
@@ -81,32 +81,16 @@
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(
method => 'fetch_bib_sources',
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",
More information about the open-ils-commits
mailing list