diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 10:55:56 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 10:55:56 +0000 |
commit | 1be3720212d812d3d4ccbd003609321a20c2a20a (patch) | |
tree | f2248dbef5aa2ff668d792a1707e9ddb623d7448 /perllib/FixMyStreet/App/Controller/Reports.pm | |
parent | 528653016c8f4a95634fd83ca4b99b969b7d8937 (diff) |
Add some more error handling of odd RSS.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index c3a6003c6..144e6e227 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -162,6 +162,10 @@ sub rss_area_ward : Path('/rss/area') : Args(2) { $area =~ s/\+/ /g; $area =~ s/\.html//; + # XXX Currently body/area overlaps here are a bit muddy. + # 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+$/) { @@ -186,6 +190,8 @@ sub rss_area_ward : Path('/rss/area') : Args(2) { } } + $c->detach( 'redirect_index' ) unless $c->stash->{area}; + $c->forward( 'ward_check', [ $ward ] ) if $ward; my $url = $c->cobrand->short_name( $c->stash->{area} ); |