diff options
author | matthew <matthew> | 2007-08-21 02:20:56 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-08-21 02:20:56 +0000 |
commit | c915bc85b85c1c1a2b22c02dff8767c50c299900 (patch) | |
tree | e69f0a72acb555ad08ab97bbea6ffe9b234eed67 | |
parent | 4c1df03a86e58abc07b6bf0005817d058d591e6d (diff) |
Cope with clicking on the sea.
-rwxr-xr-x | web/index.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/index.cgi b/web/index.cgi index df813b66d..8f17e8f2c 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.157 2007-08-18 09:58:01 matthew Exp $ +# $Id: index.cgi,v 1.158 2007-08-21 02:20:56 matthew Exp $ use strict; require 5.8.0; @@ -62,13 +62,13 @@ sub main { my %params; if ($q->param('submit_problem') || ($q->param('submit_map') && $q->param('submit_map')==2)) { $params{title} = 'Submitting your problem'; - $out = submit_problem($q); + ($out) = submit_problem($q); } elsif ($q->param('submit_update')) { $params{title} = 'Submitting your update'; ($out) = submit_update($q); } elsif ($q->param('submit_map')) { $params{title} = 'Reporting a problem'; - $out = display_form($q); + ($out) = display_form($q); } elsif ($q->param('id')) { ($out, %params) = display_problem($q); $params{title} .= ' - Viewing a problem'; @@ -412,6 +412,7 @@ sub display_form { my $all_councils = mySociety::MaPit::get_voting_area_by_location_en($easting, $northing, 'polygon', $mySociety::VotingArea::council_parent_types); + return display_location($q, 'That spot does not appear to be covered by a council - if it is past the shoreline, for example, please specify the closest point on land.') unless @$all_councils; my $areas_info = mySociety::MaPit::get_voting_areas_info($all_councils); # Look up categories for this council or councils |