From 8a2e6473d7c974a5a0cdccc49be7086789bc6c0e Mon Sep 17 00:00:00 2001 From: Hayley Mapley Date: Thu, 14 Mar 2019 03:47:59 +0000 Subject: [PATCH] Bug 12441: Search.pl conditional checks and displays using same syspref Script search.pl checks OPACdefaultSortField and OPACdefaultSortOrder, but shows defaultSortField and defaultSortOrder when using Advanced Search in the staff client. Test plan: Apply the patch and then check that the Advanced Search uses defaultSortOrder and defaultSortField sysprefs instead of the OPAC sysprefs in the conditional. Check that sort behaviour in Advanced Search still functions as expected. (It should do - this doesn't change what displays, just improves consistency). Sponsored-by: Catalyst IT Signed-off-by: Michal Denar Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit c786e4de2369de34ce26610309cbce53534446d3) Signed-off-by: Martin Renvoize --- catalogue/search.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index f3d653f737..514c4a9b2c 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -282,8 +282,8 @@ if ( $template_type eq 'advsearch' ) { $template->param(outer_sup_servers_loop => $secondary_servers_loop,); # set the default sorting - if ( C4::Context->preference('OPACdefaultSortField') - && C4::Context->preference('OPACdefaultSortOrder') ) { + if ( C4::Context->preference('defaultSortField') + && C4::Context->preference('defaultSortOrder') ) { my $default_sort_by = C4::Context->preference('defaultSortField') . '_' . C4::Context->preference('defaultSortOrder'); -- 2.39.5