diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-08-17 17:12:26 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-08-19 15:47:20 +0100 |
commit | 5c79337ad423cd7fc3cada9b7830d90726387987 (patch) | |
tree | 61615747eae7483722bea4c94309ef4d1cddac4c /perllib/FixMyStreet/Cobrand/SeeSomething.pm | |
parent | f5d6ec933c9fd4d57f9b56fec27f7c746a0706b9 (diff) |
Simplify/consolidate body restriction db code.
Make dashboard work properly in two-tier councils, showing reports sent
to both. Create an index on the array of the bodies_str column to speed
up performance, and use that throughout the code replacing all LIKE
scans. This also enables a simplifying tidy of the restriction code.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/SeeSomething.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/SeeSomething.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/Cobrand/SeeSomething.pm b/perllib/FixMyStreet/Cobrand/SeeSomething.pm index 75f1c32e8..9ae15fd8d 100644 --- a/perllib/FixMyStreet/Cobrand/SeeSomething.pm +++ b/perllib/FixMyStreet/Cobrand/SeeSomething.pm @@ -10,14 +10,9 @@ sub council_name { return 'See Something Say Something'; } sub council_url { return 'seesomething'; } sub area_types { [ 'MTD' ] } -sub site_restriction { +sub body_restriction { my $self = shift; - return { bodies_str => { IN => $self->council_id } }; -} - -sub problems_clause { - my $self = shift; - return { bodies_str => { IN => $self->council_id } }; + return $self->council_id; } sub area_check { |