diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index b4f94bb35..1fe35d0a3 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -182,7 +182,7 @@ sub display_location : Private { my ( $on_map_all, $on_map, $nearby, $distance ) = FixMyStreet::Map::map_features( $c, latitude => $latitude, longitude => $longitude, - interval => $interval, categories => $c->stash->{filter_category}, + interval => $interval, categories => [ keys %{$c->stash->{filter_category}} ], states => $c->stash->{filter_problem_states}, order => $c->stash->{sort_order}, ); @@ -264,8 +264,8 @@ sub check_and_stash_category : Private { my %categories_mapped = map { $_ => 1 } @categories; my $categories = [ $c->get_param_list('filter_category', 1) ]; - my @valid_categories = grep { $_ && $categories_mapped{$_} } @$categories; - $c->stash->{filter_category} = \@valid_categories; + my %valid_categories = map { $_ => 1 } grep { $_ && $categories_mapped{$_} } @$categories; + $c->stash->{filter_category} = \%valid_categories; } =head2 /ajax @@ -291,6 +291,8 @@ sub ajax : Path('/ajax') { # assume this is not cacheable - may need to be more fine-grained later $c->res->header( 'Cache_Control' => 'max-age=0' ); + $c->stash->{page} = 'around'; # Needed by _item.html + # how far back should we go? my $all_pins = $c->get_param('all_pins') ? 1 : undef; my $interval = $all_pins ? undef : $c->cobrand->on_map_default_max_pin_age; |