aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm18
-rw-r--r--templates/web/base/admin/body.html2
2 files changed, 1 insertions, 19 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/templates/web/base/admin/body.html b/templates/web/base/admin/body.html
index b46d411c2..be84c6415 100644
--- a/templates/web/base/admin/body.html
+++ b/templates/web/base/admin/body.html
@@ -24,7 +24,7 @@
[% END %]
[% END %]
<br>
- <a href="[% c.uri_for_email( '/reports/' _ body_id ) %]" class="admin-offsite-link">[% loc('List all reported problems' ) %]</a> |
+ <a href="[% c.uri_for_email(body.url(c)) %]" class="admin-offsite-link">[% loc('List all reported problems' ) %]</a> |
<a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a>
</p>