X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FXISBN.pm;h=55126334b3c9c997c997126edb3b40d6ba07643e;hb=c80cd97b68c76312062780783427542a5268c61f;hp=df313563ee59e35a950bbc7be562a14935ce61e0;hpb=017699c345725ea7012f1b84181dc053e20efd98;p=koha.git diff --git a/C4/XISBN.pm b/C4/XISBN.pm index df313563ee..55126334b3 100644 --- a/C4/XISBN.pm +++ b/C4/XISBN.pm @@ -26,6 +26,9 @@ use C4::External::Syndetics qw(get_syndetics_editions); use LWP::UserAgent; use HTTP::Request::Common; +use Koha::SearchEngine; +use Koha::SearchEngine::Search; + use strict; #use warnings; FIXME - Bug 2505 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -63,7 +66,8 @@ sub _get_biblio_from_xisbn { my $xisbn = shift; my $dbh = C4::Context->dbh; - my ( $errors, $results, $total_hits ) = C4::Search::SimpleSearch( "nb=$xisbn", 0, 1 ); + my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); + my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( "nb=$xisbn", 0, 1 ); return unless ( !$errors && scalar @$results ); my $record = C4::Search::new_record_from_zebra( 'biblioserver', $results->[0] );