From: miker Date: Sat, 11 Sep 2010 14:18:24 +0000 (+0000) Subject: thinko in schwarzian transform, and provide a tiebreaker sort on string X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=17768d71dabaa442abd9a235e2c962471fd2b1fc;p=evergreen%2Fbjwebb.git thinko in schwarzian transform, and provide a tiebreaker sort on string git-svn-id: svn://svn.open-ils.org/ILS/trunk@17603 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index bfe63e241..335da6d80 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -1325,7 +1325,7 @@ sub retrieve_cached_facets { my $facets = {}; if ($limit) { for my $f ( keys %$blob ) { - my @sorted = map{ { $$_[1] => $$_[0] } } sort {$$b[0] <=> $$a[0]} map { [$_, $$blob{$f}{$_}] } keys %{ $$blob{$f} }; + my @sorted = map{ { $$_[1] => $$_[0] } } sort {$$b[0] <=> $$a[0] || $$a[1] cmp $$b[1]} map { [$$blob{$f}{$_}, $_] } keys %{ $$blob{$f} }; @sorted = @sorted[0 .. $limit - 1] if (scalar(@sorted) > $limit); for my $s ( @sorted ) { my ($k) = keys(%$s);