Bug 3580 Sort the facets categories so they don't move every search.
authorFrédérick Capovilla <frederick.capovilla@sys-tech.net>
Thu, 24 Feb 2011 17:30:09 +0000 (12:30 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 25 May 2011 20:44:24 +0000 (08:44 +1200)
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
opac/opac-search.pl

index 68018b6..9b78069 100755 (executable)
@@ -431,6 +431,7 @@ if ($facets) {
     foreach my $f (@$facets) {
         $f->{facets} = [ sort { uc($a->{facet_title_value}) cmp uc($b->{facet_title_value}) } @{ $f->{facets} } ];
     }
+    @$facets = sort {$a->{expand} cmp $b->{expand}} @$facets;
 }
 
 # use Data::Dumper; print STDERR "-" x 25, "\n", Dumper($results_hashref);