Bug 25402: (QA follow-up) Remove unused downloadBasket function
[koha-ffzg.git] / authorities / auth_finder.pl
index e78a7d8..208f076 100755 (executable)
@@ -18,8 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Output;
@@ -78,6 +77,7 @@ if ( $op eq "do_search" ) {
         \@marclist, \@and_or, \@excluding, \@operator,
         \@value, $authtypecode, $orderby
     );
+    $template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate');
     my $offset = $startfrom * $resultsperpage;
     my ( $results, $total ) =
         $searcher->search_auth_compat( $search_query, $offset,
@@ -106,9 +106,9 @@ if ( $op eq "do_search" ) {
     push @field_data,
       { term => "value_main", val => scalar $query->param('value_main') || "" };
     push @field_data,
-      { term => "value_any", val => scalar $query->param('value_any') || "" };
-    push @field_data,
       { term => "value_match", val => scalar $query->param('value_match') || "" };
+    push @field_data,
+      { term => "value_any", val => scalar $query->param('value_any') || "" };
 
     my @numbers = ();
     if ( $total > $resultsperpage ) {
@@ -150,12 +150,10 @@ if ( $op eq "do_search" ) {
         from             => $from,
         to               => $to,
         numbers          => \@numbers,
-        operator_mainstr => ( @operator > 0 && $operator[0] )
-        ? $operator[0]
-        : '',
-        operator_main  => ( @operator > 1 && $operator[1] ) ? $operator[1] : '',
-        operator_any   => ( @operator > 2 && $operator[2] ) ? $operator[2] : '',
-        operator_match => ( @operator > 3 && $operator[3] ) ? $operator[3] : '',
+        operator_mainstr => ( @operator > 0 && $operator[0] ) ? $operator[0] : '',
+        operator_main    => ( @operator > 1 && $operator[1] ) ? $operator[1] : '',
+        operator_match   => ( @operator > 2 && $operator[2] ) ? $operator[2] : '',
+        operator_any     => ( @operator > 3 && $operator[3] ) ? $operator[3] : '',
     );
 }
 else {