From 0116f239ab58a8aa743045975528972bc2a44eec Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 21 May 2014 11:09:04 -0700 Subject: [PATCH] Bug 12323 - Acquisitions search results fixed in order of biblionumber The acquisitions search is exhibiting the same behavior as bug 11410. Results are always fixed in order of biblionumber, among other possible issues ( including the ampersand issue ). Test Plan: 1) From an open basket, choose "Add to basket" 2) Run a search for "From an existing record" 3) Note the "View MARC" URLs are fixed in order of biblionumber 4) Apply this patch 5) Refresh the page 6) Note the results are no longer fixed in order of biblionumber --- acqui/neworderbiblio.pl | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index 0e07066..5cff672 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -94,8 +94,17 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( # Searching the catalog. - # find results -my ( $error, $marcresults, $total_hits ) = SimpleSearch( $query, $results_per_page * ( $page - 1 ), $results_per_page ); +my @operands = $query; +my $QParser; +$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser')); +my $builtquery; +if ($QParser) { + $builtquery = $query; +} else { + my ( $builterror,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type); + ( $builterror,$builtquery,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(undef,\@operands); +} +my ( $error, $marcresults, $total_hits ) = SimpleSearch( $builtquery, $results_per_page * ( $page - 1 ), $results_per_page ); if (defined $error) { $template->param( -- 1.7.2.5