aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Alert.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-12 14:54:22 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-12 14:54:22 +0100
commit52115baa1092fb9da6a037fa142ebd08389465fd (patch)
treedee2ec30c7bc9ef6b687309cc7012a68d3441da0 /perllib/FixMyStreet/App/Controller/Alert.pm
parent86d96e9047e20e2d92d2d5edbc9505d82eb6498c (diff)
extract council based rss feeds to method
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm26
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';