aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-07-02 16:36:35 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-07-02 16:36:35 +0100
commit6e3ea5f3fbc56919dd183276bfb84b1deef9c21c (patch)
treecbf63e1977ea545e2f2fa625f9a3444af3b4273a /perllib/FixMyStreet/Cobrand/FiksGataMi.pm
parent3b45695dddd4aa35e7b04a2a10b8e7732217e155 (diff)
parentdadddc42f5e5c4b3a02db9171a485885b1e365a7 (diff)
Merge branch 'use-the-body-id'
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/FiksGataMi.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 306ad358a..74af9cb7d 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -125,6 +125,9 @@ sub council_rss_alert_options {
}
}
+ my $body_kommune = FixMyStreet::DB->resultset('Body')->for_areas($kommune->{id})->first;
+ my $body_fylke = FixMyStreet::DB->resultset('Body')->for_areas($fylke->{id})->first;
+
if ( $fylke->{id} == 3 ) { # Oslo
my $short_name = $self->short_name($fylke, $all_councils);
( my $id_name = $short_name ) =~ tr/+/_/;
@@ -132,7 +135,7 @@ sub council_rss_alert_options {
push @options,
{
type => 'council',
- id => sprintf( 'council:%s:%s', $fylke->{id}, $id_name ),
+ id => sprintf( 'council:%s:%s', $body_fylke->id, $id_name ),
rss_text =>
sprintf( _('RSS feed of problems within %s'), $fylke->{name} ),
text => sprintf( _('Problems within %s'), $fylke->{name} ),
@@ -167,7 +170,7 @@ sub council_rss_alert_options {
push @reported_to_options,
{
type => 'council',
- id => sprintf( 'council:%s:%s', $kommune->{id}, $id_kommune_name ),
+ id => sprintf( 'council:%s:%s', $body_kommune->id, $id_kommune_name ),
rss_text =>
sprintf( _('RSS feed of %s'), $kommune->{name} ),
text => $kommune->{name},
@@ -175,11 +178,11 @@ sub council_rss_alert_options {
},
{
type => 'council',
- id => sprintf( 'council:%s:%s', $fylke->{id}, $id_fylke_name ),
+ id => sprintf( 'council:%s:%s', $body_fylke->id, $id_fylke_name ),
rss_text =>
sprintf( _('RSS feed of %s'), $fylke->{name} ),
text => $fylke->{name},
- uri => $c->uri_for( '/rss/reports/', $short_fylke_name ),
+ uri => $c->uri_for( '/rss/reports', $short_fylke_name ),
};
}