Bug 12478: reinstate zebra compatibility for auth search

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>
This commit is contained in:
Robin Sheat 2015-03-17 17:23:56 +13:00 committed by Brendan Gallagher
parent 841cb93701
commit 2f0fb1b844
1 changed files with 17 additions and 14 deletions

View File

@ -22,21 +22,9 @@ package Koha::SearchEngine::Zebra::Search;
#with 'Koha::SearchEngine::SearchRole';
use base qw(Class::Accessor);
# Removed because it doesn't exist/doesn't work.
#use Data::SearchEngine::Zebra;
#use Data::SearchEngine::Query;
#use Koha::SearchEngine::Zebra;
#use Data::Dump qw(dump);
use C4::Search; # :(
# Broken without the Data:: stuff
#has searchengine => (
# is => 'rw',
# isa => 'Koha::SearchEngine::Zebra',
# default => sub { Koha::SearchEngine::Zebra->new },
# lazy => 1
#);
use C4::AuthoritiesMarc;
sub search {
my ($self,$query_string) = @_;
@ -71,6 +59,21 @@ sub search_compat {
return getRecords(@_);
}
sub dosmth {'bou' }
=head search_auth_compat
This passes the search query on to C4::AuthoritiesMarc::SearchAuthorities
=cut
sub search_auth_compat {
my ( $self, $q, $startfrom, $resperpage ) = @_;
my @params = (
@{$q}{ marclist, and_or, excluding, operator, value },
$startfrom - 1,
$resperpage, @{$q}{ authtypecode, orderby }
);
C4::AuthoritiesMarc::SearchAuthorities(@params);
}
1;