From 59f31b98361046af37646485f652f70e16a2e206 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 10 Feb 2010 17:13:41 +0100 Subject: [PATCH] BZ4116: results from cataloging search is different from advanced search results Signed-off-by: Galen Charlton --- C4/Search.pm | 1 - cataloguing/addbooks.pl | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 22eac78ac5..14e85ce625 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1649,7 +1649,6 @@ sub searchResults { } # XSLT processing of some stuff - my $debug=1; use C4::Charset; SetUTF8Flag($marcrecord); $debug && warn $marcrecord->as_formatted; diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index e9113918aa..b08f1e5dce 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -68,8 +68,13 @@ foreach my $thisframeworkcode ( sort {$frameworks->{$a} cmp $frameworks->{$b}}ke # Searching the catalog. if ($query) { + # build query + 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($query, $results_per_page * ($page - 1), $results_per_page); + my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page); if ( defined $error ) { $template->param( error => $error ); -- 2.39.5