aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/index.cgi3
-rwxr-xr-xweb/reports.cgi3
2 files changed, 4 insertions, 2 deletions
diff --git a/web/index.cgi b/web/index.cgi
index b3c31585e..f027d2da3 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -14,6 +14,7 @@ use Error qw(:try);
use File::Slurp;
use RABX;
use CGI::Carp;
+use POSIX qw(strcoll);
use URI::Escape;
# use Carp::Always;
@@ -551,7 +552,7 @@ please specify the closest point on land.')) unless %$all_councils;
my $categories = select_all("select area_id, category from contacts
where deleted='f' and area_id in (" . join(',', keys %$all_councils) . ')');
if ($q->{site} ne 'emptyhomes') {
- @$categories = sort { $a->{category} cmp $b->{category} } @$categories;
+ @$categories = sort { strcoll($a->{category}, $b->{category}) } @$categories;
foreach (@$categories) {
$council_ok{$_->{area_id}} = 1;
next if $_->{category} eq _('Other');
diff --git a/web/reports.cgi b/web/reports.cgi
index f0ecf9c7a..784c52917 100755
--- a/web/reports.cgi
+++ b/web/reports.cgi
@@ -12,6 +12,7 @@
use strict;
use Standard;
use Encode;
+use POSIX qw(strcoll);
use URI::Escape;
use FixMyStreet::Alert;
use mySociety::MaPit;
@@ -201,7 +202,7 @@ sub main {
print '<th>' . _('Old problems,<br>state unknown') . '</th>';
}
print '<th>' . _('Recently fixed') . '</th><th>' . _('Older fixed') . '</th></tr>';
- foreach (sort { $areas_info->{$a}->{name} cmp $areas_info->{$b}->{name} } keys %$areas_info) {
+ foreach (sort { strcoll($areas_info->{$a}->{name}, $areas_info->{$b}->{name}) } keys %$areas_info) {
next if mySociety::Config::get('COUNTRY') eq 'NO' && $_ eq 301; # Only want one Oslo
print '<tr align="center"';
++$c;