From: Ian Walls To: koha-patches@lists.koha-community.org Cc: Jared Camins-Esakov , Ian Walls Subject: [PATCH] Bug 6154: Default sorting by title doesn't work Date: Sun, 10 Apr 2011 17:28:05 -0400 Message-Id: <1302470885-1801-1-git-send-email-ian.walls@bywatersolutions.com> X-Mailer: git-send-email 1.5.6.5 Content-Type: text/plain; charset="utf-8" From: Jared Camins-Esakov 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 --- C4/Search.pm | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index a8d6625..ab7cb59 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(); -- 1.5.6.5