From a9c0ca5feabab45dda83e48c8a2b42bf3d7a73d7 Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Sat, 29 Sep 2018 19:51:45 +0300 Subject: [PATCH] Bug 21455: Authority search options get shuffled around when you click on 'Search' In the staff client, when you perform an authority search the selected values for the 'Search all headings:' and 'Search entire record:' options get shuffled around when you click on the 'Search' button. This patch fixes that. Test plan: 1) Perform an authority search and set the 'Search all headings:' option to 'starts with'. 2) Click on the 'Search' button. 3) Notice how the 'Search all headings:' option is now 'contains', and 'starts with' has moved down to the 'Search entire record:' option. 4) Apply the patch. 5) Hit 'Search' again. This time the selected search options do not move around. Signed-off-by: Pierre-Marc Thibault --- authorities/auth_finder.pl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index e78a7d8..6f87cb4 100755 --- a/authorities/auth_finder.pl +++ b/authorities/auth_finder.pl @@ -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 { -- 2.7.4