Bug 8172: Followup: Removes useless empty params
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 2 Jul 2012 14:14:35 +0000 (16:14 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 29 Aug 2012 13:38:59 +0000 (15:38 +0200)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Search.pm
cataloguing/addbooks.pl

index fd81610..9f843c3 100644 (file)
@@ -1792,7 +1792,7 @@ sub searchResults {
         # XSLT processing of some stuff
        use C4::Charset;
        SetUTF8Flag($marcrecord);
-       $debug && warn $marcrecord->as_formatted;
+        warn $marcrecord->as_formatted if $DEBUG;
        my $interface = $search_context eq 'opac' ? 'OPAC' : '';
        if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
             $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems);
index 5f3b7d3..7bca2f3 100755 (executable)
@@ -70,8 +70,7 @@ 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);
+    my ( $builterror,$builtquery,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(undef,\@operands);
 
     # find results
     my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page);