From 499c694daf408571cc8370b4c20568336ba35cde 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 --- C4/Search.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index a8d6625a05..ab7cb59721 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -359,10 +359,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