aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm3
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm6
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm2
3 files changed, 4 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index bd60f8570..495e47c2a 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -487,9 +487,6 @@ sub generate_csv : Private {
}
$csv->print($c->response, [
- map {
- $_ = encode('UTF-8', $_) if $_;
- }
@{$hashref}{
@{$c->stash->{csv}->{columns}}
},
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 8944a9307..10c869aee 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1578,9 +1578,9 @@ sub generate_category_extra_json : Private {
my @fields = map {
{
%$_,
- required => $_->{required} eq "true" ? $true : $false,
- variable => $_->{variable} eq "true" ? $true : $false,
- order => int($_->{order}),
+ required => ($_->{required} || '') eq "true" ? $true : $false,
+ variable => ($_->{variable} || '') eq "true" ? $true : $false,
+ order => int($_->{order} || 0),
}
} @{ $c->stash->{category_extras}->{$c->stash->{category}} };
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 8109fda2e..fc5176a07 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -563,7 +563,7 @@ sub load_and_group_problems : Private {
my $body = $c->stash->{body}; # Might be undef
my $filter = {
- order_by => $c->stash->{sort_order},
+ order_by => [ $c->stash->{sort_order}, { -desc => 'me.id' } ],
rows => $c->cobrand->reports_per_page,
};
if ($c->user_exists && $body) {