diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-11-04 17:26:07 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-11-04 17:26:07 +0000 |
commit | 37ed4d4aae659db14f77d96e5da8e2deb922860d (patch) | |
tree | 05537c2b3a6f5135696f96938e967ecc9782dbdb /perllib/FixMyStreet/App/Controller/Around.pm | |
parent | f437c3f97bd05afaad265c314dbc34c55dd20bfb (diff) | |
parent | 051093f803444d99c48d130d59dcfe2ba9759c90 (diff) |
Merge branch 'issues/forcouncils/99-sorting'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index cd96c3b5d..b4f94bb35 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -176,13 +176,16 @@ sub display_location : Private { # Check the category to filter by, if any, is valid $c->forward('check_and_stash_category'); + $c->forward( '/reports/stash_report_sort', [ 'created-desc' ]); # get the map features my ( $on_map_all, $on_map, $nearby, $distance ) = FixMyStreet::Map::map_features( $c, latitude => $latitude, longitude => $longitude, interval => $interval, categories => $c->stash->{filter_category}, - states => $c->stash->{filter_problem_states} ); + states => $c->stash->{filter_problem_states}, + order => $c->stash->{sort_order}, + ); # copy the found reports to the stash $c->stash->{on_map} = $on_map; @@ -293,13 +296,16 @@ sub ajax : Path('/ajax') { my $interval = $all_pins ? undef : $c->cobrand->on_map_default_max_pin_age; $c->forward( '/reports/stash_report_filter_status' ); + $c->forward( '/reports/stash_report_sort', [ 'created-desc' ]); # extract the data from the map my ( $on_map_all, $on_map_list, $nearby, $dist ) = FixMyStreet::Map::map_features($c, bbox => $bbox, interval => $interval, categories => [ $c->get_param_list('filter_category', 1) ], - states => $c->stash->{filter_problem_states} ); + states => $c->stash->{filter_problem_states}, + order => $c->stash->{sort_order}, + ); # create a list of all the pins my @pins = map { |