aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Nearby.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Nearby.pm18
1 files changed, 2 insertions, 16 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
index a0ccb8a6d..a6b00ef7b 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
@@ -19,12 +19,10 @@ sub nearby {
if $interval;
$params->{id} = { -not_in => $ids }
if $ids;
- $params = {
- %{ $c->cobrand->problems_clause },
- %$params
- } if $c->cobrand->problems_clause;
$params->{category} = $category if $category;
+ $rs = FixMyStreet::DB::ResultSet::Problem::to_body($rs, $c->cobrand->body_restriction);
+
my $attrs = {
prefetch => 'problem',
bind => [ $mid_lat, $mid_lon, $dist ],
@@ -36,16 +34,4 @@ sub nearby {
return \@problems;
}
-# XXX Not currently used, so not migrating at present.
-#sub fixed_nearby {
-# my ($dist, $mid_lat, $mid_lon) = @_;
-# mySociety::Locale::in_gb_locale { select_all(
-# "select id, title, latitude, longitude, distance
-# from problem_find_nearby(?, ?, $dist) as nearby, problem
-# where nearby.problem_id = problem.id and state='fixed'
-# site_restriction
-# order by lastupdate desc", $mid_lat, $mid_lon);
-# }
-#}
-
1;