diff options
author | Steven Day <steve@mysociety.org> | 2015-08-12 17:42:41 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-02 13:34:54 +0100 |
commit | a344b99a0bf37134079afda51c6f963e1163904b (patch) | |
tree | 920bfa86c19113f9a2c99d401da885cea5e9f078 /perllib/FixMyStreet/DB/ResultSet/Problem.pm | |
parent | b002374a885736b7436fc1c3132e50b6a1f8bdf9 (diff) |
Allow cobrands to give extra parameters for pins.
So that you can build functionality to add extra limitations on
to the map pins displayed. Useful for Collideoscope initially
to filter out (or in) reports from the Department of Transport's
Stats19 Data.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index e262cb63e..ef078ed08 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -176,6 +176,9 @@ sub around_map { $rs->non_public_if_possible($q, $c); + # Add in any optional extra query parameters + $q = { %$q, %{$p{extra}} } if $p{extra}; + my $problems = mySociety::Locale::in_gb_locale { $rs->search( $q, $attr )->include_comment_counts->page($p{page}); }; |