MT3652 : Unifying the search of neworder with Search
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 24 Jun 2010 17:26:18 +0000 (19:26 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 25 Jun 2010 00:42:40 +0000 (20:42 -0400)
This patch unifies the search in neworder so that the same biblios should be sent back when searching from catalogue search or from box.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
acqui/neworderbiblio.pl

index 09709d7..a06faca 100755 (executable)
@@ -91,7 +91,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 );
 
 # Searching the catalog.
-my ($error, $marcresults, $total_hits) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page);
+my @operands = $query;
+my ( @operators, @indexes, @sort_by, @limits ) = ();
+my ( $builterror, $builtquery, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc, $stopwords_removed, $query_type ) =
+      buildQuery( \@operators, \@operands, \@indexes, @limits, \@sort_by, undef, undef );
+
+    # find results
+my ( $error, $marcresults, $total_hits ) = SimpleSearch( $builtquery, $results_per_page * ( $page - 1 ), $results_per_page );
 
 if (defined $error) {
     warn "error: ".$error;