diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 7ea3a1e7f..e60c485ae 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -64,13 +64,7 @@ sub list : Path('list') : Args(0) { map { Utils::truncate_coordinate($_) } ( $c->stash->{latitude}, $c->stash->{longitude} ); - $c->stash->{council_check_action} = 'alert'; - unless ( $c->forward('/council/load_and_check_councils_and_wards') ) { - $c->go('index'); - } - - ( $c->stash->{options}, $c->stash->{reported_to_options} ) = - $c->cobrand->council_rss_alert_options( $c->stash->{all_councils} ); + $c->forward('setup_council_rss_feeds'); my $dist = mySociety::Gaze::get_radius_containing_population( $c->stash->{latitude}, @@ -485,6 +479,24 @@ sub setup_coordinate_rss_feeds : Private { return 1; } +=head2 setup_council_rss_feeds + +Generate the details required to display the council/ward/area RSS feeds + +=cut + +sub setup_council_rss_feeds : Private { + my ( $self, $c ) = @_; + + $c->stash->{council_check_action} = 'alert'; + unless ( $c->forward('/council/load_and_check_councils_and_wards') ) { + $c->go('index'); + } + + ( $c->stash->{options}, $c->stash->{reported_to_options} ) = + $c->cobrand->council_rss_alert_options( $c->stash->{all_councils} ); +} + sub choose : Private { my ( $self, $c ) = @_; $c->stash->{template} = 'alert/choose.html'; |