Bugzilla – Bug 7124
Country Codes drop down not sorted by ALPHA string
Last modified: 2008-02-13 20:43:49 UTC
Country Codes drop down are not sorted by ALPHA string. It looks like they are being sorted by country code (hidden). Suggest they get ALPHA sorted.
Re-assigning to Matthew.
this is the code doing the sorting - I don't understand what it's doing, so I'm probably not the best person to suggest a fix. sub getCountries : Private { my ( $self, $c, $default ) = @_; my $countries = $c->cache->get( 'countries' ); if ( !$countries ) { $countries = {}; for my $code ( Geography::Countries::code2() ) { $countries->{ $code } = Geography::Countries::country( $code ); } $c->cache->set( 'countries', $countries, 86400 * 7 ); } # Re-sort countries tie my %sorted, 'Tie::IxHash'; for my $key ( sort { $countries->{$a} cmp $countries->{$b} } keys %{$countries} ) { $sorted{$key} = $countries->{$key}; } return \%sorted; }
Fixed in r2468, TT code was buggy.
Verified fixed in SqueezeNetwork r2487/r17521, HW Beta (dc)