typos / bug-fixes for the added content stuff
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Dec 2005 20:23:21 +0000 (20:23 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Dec 2005 20:23:21 +0000 (20:23 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2552 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search.pm
Open-ILS/src/perlmods/OpenILS/Application/Search/AddedContent.pm

index 87652f9..3abe2ae 100644 (file)
@@ -13,7 +13,7 @@ use OpenSRF::Utils::Cache;
 #use OpenILS::Application::Search::StaffClient;
 use OpenILS::Application::Search::Biblio;
 use OpenILS::Application::Search::Authority;
-use OpenILS::Application::Search::Actor;
+#use OpenILS::Application::Search::Actor;
 use OpenILS::Application::Search::Z3950;
 
 
@@ -35,17 +35,16 @@ sub initialize {
        my $implementation = $conf->config_value(                                       
                "apps", "open-ils.search","app_settings", "added_content", "implementation" );
 
-       if($implementation) {
-               eval "use $implementation";
-               if($@) {        
-                       $logger->error("Unable to load Added Content handler: $@"); 
-                       return; 
-               }
-               $implementation->initialize();
+       $implementation = "OpenILS::Application::Search::AddedContent" unless $implementation;
 
-       } else { #if none is defined, use the default which returns empty sets
-               eval "use OpenILS::Application::Search::AddedContent";
+       $logger->debug("Attempting to load Added Content handler: $implementation");
+       eval "use $implementation";
+       if($@) {        
+               $logger->error("Unable to load Added Content handler [$implementation]: $@"); 
+               return; 
        }
+
+       eval { $implementation->initialize(); };
 }
 
 sub filter_search {
index 6c5ec17..1e27f87 100644 (file)
@@ -2,6 +2,8 @@ package OpenILS::Application::Search::AddedContent;
 use base qw/OpenSRF::Application/;
 use strict; use warnings;
 
+sub initialize { return 1; }
+
 
 __PACKAGE__->register_method(
        method  => "summary",