aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm18
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm1
-rw-r--r--perllib/FixMyStreet/Cobrand/EmptyHomes.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm2
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm2
5 files changed, 4 insertions, 21 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 027b0d5a4..02dc4dc11 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -188,15 +188,6 @@ sub rss_area_ward : Path('/rss/area') : Args(2) {
# We're checking an area here, but this function is currently doing that.
return if $c->cobrand->reports_body_check( $c, $area );
- # If we're passed an ID number (don't think this is used anywhere, it
- # certainly shouldn't be), just look that up on mapit and redirect
- if ($area =~ /^\d+$/) {
- my $council = mySociety::MaPit::call('area', $area);
- $c->detach( 'redirect_index') if $council->{error};
- $c->stash->{body} = $council;
- $c->detach( 'redirect_body' );
- }
-
# We must now have a string to check on mapit
my $areas = mySociety::MaPit::call( 'areas', $area,
type => $c->cobrand->area_types,
@@ -296,15 +287,6 @@ sub body_check : Private {
# Oslo/ kommunes sharing a name in Norway
return if $c->cobrand->reports_body_check( $c, $q_body );
- # If we're passed an ID number (don't think this is used anywhere, it
- # certainly shouldn't be), just look that up on MaPit and redirect
- if ($q_body =~ /^\d+$/) {
- my $area = mySociety::MaPit::call('area', $q_body);
- $c->detach( 'redirect_index') if $area->{error};
- $c->stash->{body} = $area;
- $c->detach( 'redirect_body' );
- }
-
# We must now have a string to check
my @bodies = $c->model('DB::Body')->search( { name => { -like => "$q_body%" } } )->all;
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index c76ee0f7d..6ba144f0d 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -625,6 +625,7 @@ sub short_name {
my ($area) = @_;
my $name = $area->{name} || $area->name;
+ $name =~ tr{/}{_};
$name = URI::Escape::uri_escape_utf8($name);
$name =~ s/%20/+/g;
return $name;
diff --git a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
index 995c39c85..70c3c9469 100644
--- a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
+++ b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
@@ -81,7 +81,7 @@ sub short_name {
$name =~ s/ (Borough|City|District|County) Council$//;
$name =~ s/ Council$//;
$name =~ s/ & / and /;
- $name =~ s{/}{_}g;
+ $name =~ tr{/}{_};
$name = URI::Escape::uri_escape_utf8($name);
$name =~ s/%20/-/g;
return $name;
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index c33b39aac..0eff48b00 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -109,7 +109,7 @@ sub short_name {
$name =~ s/ (Borough|City|District|County) Council$//;
$name =~ s/ Council$//;
$name =~ s/ & / and /;
- $name =~ s{/}{_}g;
+ $name =~ tr{/}{_};
$name = URI::Escape::uri_escape_utf8($name);
$name =~ s/%20/+/g;
return $name;
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index 58788119a..8b1ce6759 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -145,7 +145,7 @@ sub send(;$) {
$skip = 1;
debug_print("skipped by sender " . $sender_info->{method} . " (might be due to previous failed attempts?)", $row->id) if $debug_mode;
} else {
- debug_print("OK, adding recipient body " . $body->id . ":" . $body->name . ", " . $body->send_method, $row->id) if $debug_mode;
+ debug_print("OK, adding recipient body " . $body->id . ":" . $body->name . ", " . $sender_info->{method}, $row->id) if $debug_mode;
push @dear, $body->name;
$reporters{ $sender }->add_body( $body, $sender_info->{config} );
}