aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm2
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm13
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm2
4 files changed, 14 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index 4e5319a59..91ea61fbc 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -438,7 +438,7 @@ sub determine_location : Private {
$c->detach('choose');
}
- $c->go('index') if $c->stash->{location_error};
+ $c->go('index');
}
# truncate the lat,lon for nicer urls
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index fe4b652ed..baaa3b927 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -106,10 +106,19 @@ sub local_problems_pc_distance : Path('pc') : Args(2) {
}
-sub local_problems : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)(?:/(\d+))?$') {
+sub local_problems_dist : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)/(\d+)$') {
my ( $self, $c ) = @_;
+ $c->forward( 'local_problems', $c->req->captures );
+}
+
+sub local_problems_no_dist : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)$') {
+ my ( $self, $c ) = @_;
+ $c->forward( 'local_problems', $c->req->captures );
+}
+
+sub local_problems : Private {
+ my ( $self, $c, $type, $a, $b, $d ) = @_;
- my ( $type, $a, $b, $d) = @{ $c->req->captures };
$c->forward( 'get_query_parameters', [ $d ] );
$c->detach( 'redirect_lat_lon', [ $a, $b ] )
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index b9a893778..a6c9c6fba 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -697,7 +697,7 @@ If set to an arrayref, will plot those area ID(s) from mapit on all the /around
=cut
-sub areas_on_around {}
+sub areas_on_around { []; }
sub process_extras {}
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index dfdce641e..58da5166c 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -45,7 +45,7 @@ sub process_extras {
my $extra = shift;
my $fields = shift || [];
- if ( $area_id == 2482 ) {
+ if ( $area_id eq '2482' ) {
my @fields = ( 'fms_extra_title', @$fields );
for my $field ( @fields ) {
my $value = $ctx->request->param( $field );