[open-ils-commits] r14158 - tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Search (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 24 15:18:21 EDT 2009


Author: miker
Date: 2009-09-24 15:18:16 -0400 (Thu, 24 Sep 2009)
New Revision: 14158

Modified:
   tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
backporting r14155: correcting thinko that caused calling a cstore method before cstore is started

Modified: tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm	2009-09-24 19:18:09 UTC (rev 14157)
+++ tags/rel_1_6_0_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm	2009-09-24 19:18:16 UTC (rev 14158)
@@ -94,7 +94,6 @@
 # -------------------------------------------------------------------
 sub fetch_service_defs {
 
-    $sclient = OpenSRF::Utils::SettingsClient->new();
     my $hash = $sclient->config_value('z3950', 'services');
 
     # overlay config file values with in-db values
@@ -159,7 +158,7 @@
 # Load the pre-defined Z server configs
 # -------------------------------------------------------------------
 sub child_init {
-    fetch_service_defs();
+    $sclient = OpenSRF::Utils::SettingsClient->new();
     $default_service = $sclient->config_value("z3950", "default" );
 }
 
@@ -169,6 +168,8 @@
 # -------------------------------------------------------------------
 sub do_class_search {
 
+    	fetch_service_defs() unless (scalar(keys(%services)));
+
 	my $self			= shift;
 	my $conn			= shift;
 	my $auth			= shift;
@@ -249,6 +250,8 @@
 # -------------------------------------------------------------------
 sub do_service_search {
 
+    	fetch_service_defs() unless (scalar(keys(%services)));
+
 	my $self			= shift;
 	my $conn			= shift;
 	my $auth			= shift;
@@ -272,6 +275,8 @@
 # -------------------------------------------------------------------
 sub do_search {
 
+    	fetch_service_defs() unless (scalar(keys(%services)));
+
 	my $self	= shift;
 	my $conn	= shift;
 	my $auth = shift;
@@ -344,6 +349,9 @@
 # and mvr objects
 # -------------------------------------------------------------------
 sub process_results {
+
+    	fetch_service_defs() unless (scalar(keys(%services)));
+
 	my $results	= shift;
 	my $limit	= shift || 10;
 	my $offset	= shift || 0;
@@ -420,6 +428,8 @@
 # -------------------------------------------------------------------
 sub compile_query {
 
+    	fetch_service_defs() unless (scalar(keys(%services)));
+
 	my $seperator	= shift;
 	my $service		= shift;
 	my $hash			= shift;



More information about the open-ils-commits mailing list