diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-11-11 17:14:53 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-11-11 17:14:53 +0000 |
commit | 74c1a09a10d606d9d8850f7fb70b6e578d2c3877 (patch) | |
tree | 6cd70d409d3ac7e14b1c1c5d10aa366d8546c77f /perllib/FixMyStreet/App/Controller/Rss.pm | |
parent | 3d2e9c254244592ddce937230cbd0e057f69e073 (diff) | |
parent | c0e4463163d4a9b9a8be073964ef960b114c9ea0 (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 13 |
1 files changed, 11 insertions, 2 deletions
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 ] ) |