aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-18 12:15:55 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-18 12:15:55 +0100
commit69284dad6f9b645eff9abe84b09463c0bf32fc24 (patch)
tree77cd1947f6ffb8435276c64c67028ccd8603cc53 /perllib/FixMyStreet
parentb50e91710b4dc37fb5f9e3ec28233d34c6413c25 (diff)
Work much better if reporting pin is clicked/dragged outside council boundary
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index b012be48e..9c2899c21 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -60,9 +60,16 @@ sub council_check {
return 1;
}
my $url = 'http://www.fixmystreet.com/';
- $url .= 'alert' if $context eq 'alert';
+ if ( $context eq 'alert' ) {
+ $url .= 'alert';
+ } else {
+ $url .= 'around';
+ }
$url .= '?pc=' . URI::Escape::uri_escape( $self->{c}->req->param('pc') )
if $self->{c}->req->param('pc');
+ $url .= '?latitude=' . URI::Escape::uri_escape( $self->{c}->req->param('latitude') )
+ . '&amp;longitude=' . URI::Escape::uri_escape( $self->{c}->req->param('longitude') )
+ if $self->{c}->req->param('latitude');
my $error_msg = "That location is not covered by " . $self->council_name . ".
Please visit <a href=\"$url\">the main FixMyStreet site</a>.";
return ( 0, $error_msg );