Bug 12478: starting authority search in staff client

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-06-15 15:12:39 +12:00 committed by Brendan Gallagher
parent 8349e6955e
commit 2a73cf100b
1 changed files with 17 additions and 6 deletions

View File

@ -77,13 +77,24 @@ if ( $op eq "do_search" ) {
my $startfrom = $query->param('startfrom') || 1;
my $resultsperpage = $query->param('resultsperpage') || 20;
my ( $results, $total ) = SearchAuthorities(
[$marclist], [$and_or],
[$excluding], [$operator],
[$value], ( $startfrom - 1 ) * $resultsperpage,
$resultsperpage, $authtypecode,
$orderby
my $builder = Koha::SearchEngine::QueryBuilder->new();
my $searcher = Koha::SearchEngine::Search->new({index => 'authorities'});
my $search_query = $builder->build_authorities_query_compat(
[$marclist], [$and_or], [$excluding], [$operator],
[$value], $authtypecode, $orderby
);
$startfrom = $startfrom // 0;
my ( $results, $total ) =
$searcher->search_auth_compat( $search_query, $startfrom + 1,
$resultsperpage );
#my ( $results, $total ) = SearchAuthorities(
# [$marclist], [$and_or],
# [$excluding], [$operator],
# [$value], ( $startfrom - 1 ) * $resultsperpage,
# $resultsperpage, $authtypecode,
# $orderby
#);
( $template, $loggedinuser, $cookie ) = get_template_and_user(