diff options
author | Struan Donald <struan@exo.org.uk> | 2012-09-03 17:58:54 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-09-03 17:58:54 +0100 |
commit | 5b90af6e79940d8de734d06d20ed82c52a50b56e (patch) | |
tree | be556122e88f1c87e0d4c7e6e7c4db676722131a /perllib | |
parent | 41e11f0968be098f47f82986f255e037087624bb (diff) |
make around test for non public reports work, and do not display non
public reports on around page
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Nearby.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm index 83fc85a88..191223572 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm @@ -8,6 +8,7 @@ sub nearby { my ( $rs, $c, $dist, $ids, $limit, $mid_lat, $mid_lon, $interval ) = @_; my $params = { + non_public => 0, state => [ FixMyStreet::DB::Result::Problem::visible_states() ], }; $params->{'current_timestamp-lastupdate'} = { '<', \"'$interval'::interval" } diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 049cf7ce4..2f426e8ca 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -142,6 +142,7 @@ sub around_map { $attr->{rows} = $limit if $limit; my $q = { + non_public => 0, state => [ FixMyStreet::DB::Result::Problem->visible_states() ], latitude => { '>=', $min_lat, '<', $max_lat }, longitude => { '>=', $min_lon, '<', $max_lon }, |