diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-21 12:31:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-21 12:31:17 +0000 |
commit | e2bf144a6aaa19779fc55a04081a3c269b9d0f81 (patch) | |
tree | 00318d801d35948938743608252fccd2d1b4e585 /perllib/FixMyStreet/App/Controller/Location.pm | |
parent | eb0c0d42f3596c5dc21e9bcdcc02a4008a541c34 (diff) | |
parent | f8a8948ddb790e7e7593d538c55a3a278fbf3973 (diff) |
Merge remote branch 'origin/zurich'
(locale ignored, will rerun .po extraction after to get all changes.)
Conflicts:
locale/FixMyStreet.po
locale/cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po
locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po
locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
locale/nn_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
templates/web/fixmystreet/report/banner.html
templates/web/zurich/faq/faq-de-ch.html
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Location.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Location.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm index fd3fadd9f..f103ff7f9 100644 --- a/perllib/FixMyStreet/App/Controller/Location.pm +++ b/perllib/FixMyStreet/App/Controller/Location.pm @@ -50,6 +50,8 @@ sub determine_location_from_coords : Private { User has searched for a location - try to find it for them. +Return -1 if nothing provided. + If one match is found returns true and lat/lng is set. If several possible matches are found puts an array onto stash so that user can be prompted to pick one and returns false. @@ -62,7 +64,7 @@ sub determine_location_from_pc : Private { my ( $self, $c, $pc ) = @_; # check for something to search - $pc ||= $c->req->param('pc') || return; + $pc ||= $c->req->param('pc') || return -1; $c->stash->{pc} = $pc; # for template if ( $pc =~ /^(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)$/ ) { |