From 87ab53814adfe9ed57d8efe92778134ebdf45285 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sun, 10 Apr 2011 17:28:05 -0400 Subject: [PATCH] Bug 6154: Default sorting by title doesn't work If you have the default sorting set to title ascending or title descending, your search results will not automatically be sorted because the syspref uses title_asc and title_dsc, whereas Search.pm wants title_az and title_za. The same issue is present when the default sort is on author. Signed-off-by: Ian Walls Signed-off-by: Chris Cormack (cherry picked from commit 499c694daf408571cc8370b4c20568336ba35cde) Signed-off-by: Chris Nighswonger --- C4/Search.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index c681452bba..b9867ee46c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -350,10 +350,10 @@ sub getRecords { # Note: sort will override rank my $sort_by; foreach my $sort (@sort_by) { - if ( $sort eq "author_az" ) { + if ( $sort eq "author_az" || $sort eq "author_asc" ) { $sort_by .= "1=1003 {'RECORDS'}[ $numbers++ ] = $result{$key}->as_usmarc(); -- 2.39.5