Bug 12478: Define simple_search_compat for Zebra
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Apr 2016 07:11:11 +0000 (08:11 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:12 +0000 (20:20 +0000)
When Zebra is defined as the search engine, the authority search is
broken (Can't locate object method "simple_search_compat" via package
"Koha::SearchEngine::Zebra::Search" at /home/koha/koha/C4/AuthoritiesMarc.pm line 357.)
simple_search_compat is not defined in
Koha::SearchEngine::Zebra::Search, it should be a wrapper for
C4::Search::SimpleSearch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Koha/SearchEngine/Zebra/Search.pm

index 2e4aad3..76a9aff 100644 (file)
@@ -59,6 +59,18 @@ sub search_compat {
     return getRecords(@_);
 }
 
+=head2 simple_search_compat
+
+This passes straight through to C4::Search::SimpleSearch.
+
+=cut
+
+
+sub simple_search_compat {
+    shift;
+    return C4::Search::SimpleSearch(@_);
+}
+
 =head search_auth_compat
 
 This passes the search query on to C4::AuthoritiesMarc::SearchAuthorities