aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm5
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm6
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm3
3 files changed, 5 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index 640a8c063..4aa695ae5 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -302,15 +302,10 @@ sub ajax : Path('/ajax') {
'around/on_map_list_items.html',
{ on_map => $on_map, around_map => $around_map }
);
- my $around_map_list_html = $c->render_fragment(
- 'around/around_map_list_items.html',
- { on_map => $on_map, around_map => $around_map }
- );
# JSON encode the response
my $json = { pins => $pins };
$json->{current} = $on_map_list_html if $on_map_list_html;
- $json->{current_near} = $around_map_list_html if $around_map_list_html;
my $body = JSON->new->utf8(1)->encode($json);
$c->res->body($body);
}
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 9db9386f5..3c4ce2cf7 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -31,7 +31,7 @@ sub my : Path : Args(0) {
$c->forward( '/reports/stash_report_filter_status' );
my $pins = [];
- my $problems = {};
+ my $problems = [];
my $states = $c->stash->{filter_problem_states};
my $params = {
@@ -60,9 +60,7 @@ sub my : Path : Args(0) {
id => $problem->id,
title => $problem->title,
};
- my $state = $problem->is_fixed ? 'fixed' : $problem->is_closed ? 'closed' : 'confirmed';
- push @{ $problems->{$state} }, $problem;
- push @{ $problems->{all} }, $problem;
+ push @$problems, $problem;
}
$c->stash->{problems_pager} = $rs->pager;
$c->stash->{problems} = $problems;
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 3bd7e592b..407fc625e 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -492,6 +492,9 @@ sub stash_report_filter_status : Private {
} elsif ( $status eq 'open' ) {
$c->stash->{filter_status} = 'open';
$c->stash->{filter_problem_states} = FixMyStreet::DB::Result::Problem->open_states();
+ } elsif ( $status eq 'closed' ) {
+ $c->stash->{filter_status} = 'closed';
+ $c->stash->{filter_problem_states} = FixMyStreet::DB::Result::Problem->closed_states();
} elsif ( $status eq 'fixed' ) {
$c->stash->{filter_status} = 'fixed';
$c->stash->{filter_problem_states} = FixMyStreet::DB::Result::Problem->fixed_states();