aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Alert.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-05 17:56:00 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-05 17:56:00 +0100
commita73cc4ebffb8d10db29581081bab57ae65c23209 (patch)
treec195cae5e216780970febbeb7fbd56b38f75ca08 /perllib/FixMyStreet/App/Controller/Alert.pm
parentce6b34aa866e246fae2aadc9308a27638d8eccb3 (diff)
handle and display location finding errors
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index bdcaccc3a..db2d06844 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -74,13 +74,13 @@ sub list :Path('list') :Args(0) {
# Try to create a location for whatever we have
unless ($c->forward('/location/determine_location_from_coords')
|| $c->forward('/location/determine_location_from_pc') ) {
- if ( $c->stash->{possible_location_matches} ) {
- $c->stash->{choose_target_uri} = $c->uri_for( '/alert/list' );
- $c->detach('choose');
- }
- # FIXME: do error display here
-# return FixMyStreet::Geocode::list_choices($error, '/alert', $q) if ref($error) eq 'ARRAY';
-# return alert_front_page($q, $error) if $error;
+
+ if ( $c->stash->{possible_location_matches} ) {
+ $c->stash->{choose_target_uri} = $c->uri_for( '/alert/list' );
+ $c->detach('choose');
+ }
+
+ $c->go('index') if $c->stash->{ location_error };
}
$c->log->debug( $_ ) for ( $c->stash->{pc}, $c->stash->{latitude}, $c->stash->{longitude} );