aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Nearby.pm1
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm1
-rw-r--r--t/app/controller/around.t1
3 files changed, 3 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 },
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index 0ef9c95cf..e1c76ff9f 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -96,6 +96,7 @@ subtest 'check non public reports are not displayed on around page' => sub {
my $private = $edinburgh_problems[2];
ok $private->update( { non_public => 1 } ), 'problem marked non public';
+ $mech->get_ok('/');
$mech->submit_form_ok( { with_fields => { pc => 'EH99 1SP' } },
"good location" );
$mech->content_lacks( 'Around page Test 3 for 2651',